Commit 90919b0
authored
Add LQL function bodies and current setting builtin (#45)
## Summary
- add `bodyLql` support for PostgreSQL functions, including YAML
validation, DDL generation, and diff idempotence
- add PostgreSQL `current_setting('key')` support in LQL policy
predicates and function bodies
- add broad NAP-shaped tests covering session keys, casts, helper
functions, exists pipelines, and real Postgres RLS behavior
## Validation
- `dotnet csharpier check .`
- `make lint`
- `dotnet test Lql/Nimblesite.Lql.Tests --configuration Release
--verbosity minimal`
- `dotnet test
Migration/Nimblesite.DataProvider.Migration.Tests/Nimblesite.DataProvider.Migration.Tests.csproj
--configuration Release --no-build --verbosity minimal`
- `dotnet test
Migration/Nimblesite.DataProvider.Migration.Tests/Nimblesite.DataProvider.Migration.Tests.csproj
--filter
"FullyQualifiedName~RlsCurrentSettingLqlTests|FullyQualifiedName~PostgresFunctionBodyLqlTests|FullyQualifiedName~PostgresFunctionBodyLqlE2ETests"
--configuration Release --verbosity minimal`
- `dotnet test Sync/Nimblesite.Sync.Tests --configuration Release
--no-build --verbosity minimal`
- `dotnet test Sync/Nimblesite.Sync.SQLite.Tests --configuration Release
--no-build --verbosity minimal`
- `dotnet test Sync/Nimblesite.Sync.Postgres.Tests --configuration
Release --no-build --verbosity minimal`
- `dotnet test Sync/Nimblesite.Sync.Integration.Tests --configuration
Release --no-build --verbosity minimal`
- `dotnet test Sync/Nimblesite.Sync.Http.Tests --configuration Release
--no-build --verbosity minimal`
- `dotnet test Reporting/Nimblesite.Reporting.Tests --configuration
Release --no-build --verbosity minimal`
- `dotnet test Lql/Nimblesite.Lql.TypeProvider.FSharp.Tests
--configuration Release --no-build --verbosity minimal`
## Notes
- `make test` was not used for the final pass because the
`Nimblesite.DataProvider.Example.Tests` make target hung in nested build
startup locally; the same test project passed when rerun directly with
`--no-build` earlier in this branch.
- `Reporting.Integration.Tests` initially needed the local Playwright
Chromium install; after install, the run hit existing `.report-*` DOM
timeouts unrelated to the LQL/Migration changes and was stopped.1 parent ee0ebab commit 90919b0
12 files changed
Lines changed: 1296 additions & 51 deletions
File tree
- Lql
- Nimblesite.Lql.Core/Parsing
- Nimblesite.Lql.Tests
- Migration
- Nimblesite.DataProvider.Migration.Core
- Nimblesite.DataProvider.Migration.Postgres
- Nimblesite.DataProvider.Migration.Tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | 125 | | |
127 | 126 | | |
128 | | - | |
| 127 | + | |
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
| |||
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | 145 | | |
150 | 146 | | |
151 | 147 | | |
| |||
210 | 206 | | |
211 | 207 | | |
212 | 208 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
238 | 213 | | |
239 | 214 | | |
240 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
| |||
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
0 commit comments