Commit fffac81
Add detection for outer DECLARE statements and update documentation (#40)
* Add detection for outer DECLARE statements and update documentation
- Implemented `hasOuterDeclare` function to check for outer level DECLARE statements in SQL.
- Updated `autoAssignActions` to skip operations with outer DECLARE.
- Enhanced README and Copilot instructions to clarify limitations of automated assignment.
- Added tests for various scenarios involving outer DECLARE statements.
* feat: enhance reservation handling with native support detection
* Bump eslint from 10.0.0 to 10.0.1 (#41)
Bumps [eslint](https://github.com/eslint/eslint) from 10.0.0 to 10.0.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v10.0.0...v10.0.1)
---
updated-dependencies:
- dependency-name: eslint
dependency-version: 10.0.1
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @dataform/core from 3.0.46 to 3.0.47 in /test-project (#42)
Bumps [@dataform/core](https://github.com/dataform-co/dataform) from 3.0.46 to 3.0.47.
- [Release notes](https://github.com/dataform-co/dataform/releases)
- [Commits](dataform-co/dataform@3.0.46...3.0.47)
---
updated-dependencies:
- dependency-name: "@dataform/core"
dependency-version: 3.0.47
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump @dataform/cli from 3.0.46 to 3.0.47 in /test-project (#43)
Bumps [@dataform/cli](https://github.com/dataform-co/dataform) from 3.0.46 to 3.0.47.
- [Release notes](https://github.com/dataform-co/dataform/releases)
- [Commits](dataform-co/dataform@3.0.46...3.0.47)
---
updated-dependencies:
- dependency-name: "@dataform/cli"
dependency-version: 3.0.47
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
* Bump eslint from 10.0.1 to 10.0.2 (#48)
Bumps [eslint](https://github.com/eslint/eslint) from 10.0.1 to 10.0.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v10.0.1...v10.0.2)
---
updated-dependencies:
- dependency-name: eslint
dependency-version: 10.0.2
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump globals from 17.3.0 to 17.4.0 (#49)
Bumps [globals](https://github.com/sindresorhus/globals) from 17.3.0 to 17.4.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](sindresorhus/globals@v17.3.0...v17.4.0)
---
updated-dependencies:
- dependency-name: globals
dependency-version: 17.4.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump the npm_and_yarn group across 2 directories with 1 update (#44)
Bumps the npm_and_yarn group with 1 update in the / directory: [minimatch](https://github.com/isaacs/minimatch).
Bumps the npm_and_yarn group with 1 update in the /test-project directory: [minimatch](https://github.com/isaacs/minimatch).
Updates `minimatch` from 3.1.2 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](isaacs/minimatch@v3.1.2...v3.1.5)
Updates `minimatch` from 9.0.5 to 9.0.9
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](isaacs/minimatch@v3.1.2...v3.1.5)
---
updated-dependencies:
- dependency-name: minimatch
dependency-version: 3.1.5
dependency-type: indirect
dependency-group: npm_and_yarn
- dependency-name: minimatch
dependency-version: 9.0.9
dependency-type: indirect
dependency-group: npm_and_yarn
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update Dataform version in CI matrix and changelog to 3.0.48
* Refactor isNativeReservationSupported to always return false
* Bump eslint from 10.0.0 to 10.0.1 (#41)
Bumps [eslint](https://github.com/eslint/eslint) from 10.0.0 to 10.0.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v10.0.0...v10.0.1)
---
updated-dependencies:
- dependency-name: eslint
dependency-version: 10.0.1
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* 🧹 Refactor duplicated logic in applyReservationToAction (#45)
* refactor: deduplicate logic in applyReservationToAction
- Extracted duplicated logic for prepending statements into `prependStatement` and `isArrayOrString` helpers.
- Refactored `applyReservationToAction` to use these helpers for `contextablePreOps`, `contextableQueries`, `proto.preOps`, and `proto.queries`.
- Simplified the `action.queries` monkeypatch using `prependStatement`.
- Ensured non-mutating behavior for array prepending.
- Restored `test-project/workflow_settings.yaml` that was accidentally renamed during matrix tests.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* refactor: update exports and enhance test coverage with new utility functions
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* ⚡ Optimize reservation lookup using Map (#47)
* ⚡ Optimize reservation lookup using Map
- Refactored `preprocessConfig` to build an optimized `Map` for reservation lookups.
- Updated `findReservation` to perform O(1) lookups using the `Map`.
- Preserved "first match wins" logic and existing validation.
- Maintained backward compatibility by preserving original data structures in preprocessed config.
- Improved lookup performance by ~24x in benchmarks.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Refactor findReservation tests to use Map for action-reservation mapping
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* fix badge link
* Update changelog for version 0.2.1
* 🧪 [testing improvement] Missing test for compiled objects (proto.preOps) (#46)
* 🧪 test: add coverage for compiled objects and proto.preOps
- Added comprehensive tests for compiled objects in `test/compiled_objects.test.js`.
- Covered `proto.preOps` and `proto.queries` handling for both array and string types.
- Verified fallback mechanisms and monkeypatching logic.
- Increased line coverage of `index.js` to 100%.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* fix: standardize string quotes in compiled objects tests
* refactor: simplify monkeypatched queries tests with parameterized cases
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Remove local integration testing instructions from CONTRIBUTING.md and update isNativeSupported logic in verify_compilation.js
* fix createReservationSetter to directly use actionToReservation from preprocessConfig
* refactor createReservationSetter
* Update CONTRIBUTING.md and README.md for clarity and additional testing instructions
* Remove duplicated isArrayOrString and prependStatement functions from index.js
* lint
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent 33d3cee commit fffac81
9 files changed
Lines changed: 736 additions & 232 deletions
File tree
- .github
- workflows
- scripts
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | | - | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | | - | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | | - | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
45 | | - | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| 60 | + | |
52 | 61 | | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
57 | 67 | | |
| 68 | + | |
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
| |||
66 | 77 | | |
67 | 78 | | |
68 | 79 | | |
69 | | - | |
70 | | - | |
| 80 | + | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
| |||
80 | 90 | | |
81 | 91 | | |
82 | 92 | | |
| 93 | + | |
83 | 94 | | |
84 | 95 | | |
85 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
218 | 225 | | |
219 | 226 | | |
220 | 227 | | |
221 | | - | |
222 | | - | |
| 228 | + | |
| 229 | + | |
223 | 230 | | |
224 | 231 | | |
225 | 232 | | |
| |||
234 | 241 | | |
235 | 242 | | |
236 | 243 | | |
237 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
238 | 247 | | |
239 | | - | |
| 248 | + | |
240 | 249 | | |
241 | | - | |
242 | | - | |
243 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
244 | 253 | | |
245 | 254 | | |
246 | 255 | | |
| |||
0 commit comments