Commit 41ab370
Bump sql-psi 0.5.2 → 0.7.3 and sqldelight 2.1.0 → 2.3.2 (#167)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Summary
Bumps the two core upstream dependencies together (they release as a
pair):
- `app.cash.sql-psi:core` **0.5.2 → 0.7.3**
- `app.cash.sqldelight:*` **2.1.0 → 2.3.2**
## What changed
1. **`gradle/libs.versions.toml`** — version bumps only.
2. **`cockroachdb-dialect/.../grammar/CockroachDB.bnf`** — added an
override for the new `enum_data_type` production that PostgreSQL added
in sqldelight 2.2.x. Upstream's `enum_data_type ::= {identifier}` is an
unrestricted wildcard that turned every identifier into a valid column
type, which broke parsing of CockroachDB-specific table-level constructs
like `FAMILY f1 (id, last_accessed)` (the parser greedily consumed
`FAMILY f1` as a `column_def` instead of falling back to
`table_family_constraint`). The override replaces the production with a
never-matching placeholder.
Trade-off documented in a code comment: this dialect doesn't currently
parse `CREATE TYPE ... AS ENUM` either (it isn't part of cockroach's
`extension_stmt` override), so removing the wildcard has no functional
regression today.
3. **`cockroachdb-dialect/.../CockroachDBFixturesTest.kt`** — extended
the existing `excludedAnsiFixtures` and `excludedPgSqlFixtures` lists
for inherited test fixtures whose statements aren't currently parseable
by this dialect, with explanatory comments grouped by reason:
- SQLite-style `CREATE TRIGGER ... BEGIN ... END;` ANSI fixtures (the
PostgreSQL trigger grammar is `EXECUTE FUNCTION fn();`).
- `DROP TRIGGER IF EXISTS test;` without `ON tablename` (SQLite syntax).
- PostgreSQL-only DDL added in sqldelight 2.2.x / 2.3.x:
CREATE/ALTER/DROP POLICY, CREATE TYPE/ENUM, CREATE/DROP FUNCTION,
COMMENT ON, DROP TRIGGER, CREATE OR REPLACE TRIGGER, ALTER TABLE … ROW
LEVEL SECURITY, ALTER TABLE … SET (storage_param=…). All valid
CockroachDB SQL but not yet wired into this dialect's `extension_stmt` /
`alter_table_rules` overrides.
## Verification
```
./gradlew :cockroachdb-dialect:test # 174 fixture tests, 0 failures
./gradlew :integration-testing:assemble :integration-testing:compileTestKotlin
./gradlew spotlessCheck
./gradlew check -x :integration-testing:test # all green locally
```
`./gradlew :integration-testing:test` was not run locally (requires
Docker for testcontainers + CockroachDB image, not available in the dev
VM). CI on this PR will exercise it.
## Out of scope / follow-ups
Extending the cockroach grammar to actually parse policies, enums,
functions, comment-on, row-level-security, set-storage-parameter, and
the new trigger forms. CockroachDB does support these on the database
side; the work is to add productions to `extension_stmt` /
`alter_table_rules` and likely new mixins. That would also let us drop
most of the new exclusions and replace the `enum_data_type` placeholder
with the real production.
<!-- CURSOR_AGENT_PR_BODY_END -->
<div><a
href="https://cursor.com/agents/bc-fd4519a4-4bc1-42cd-9d8d-c77c1421faff"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-fd4519a4-4bc1-42cd-9d8d-c77c1421faff"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
---------
Co-authored-by: Cursor Agent <cursor-agent@cursor.sh>1 parent 57b1031 commit 41ab370
4 files changed
Lines changed: 147 additions & 15 deletions
File tree
- cockroachdb-dialect/src
- main/kotlin/com/faire/sqldelight/dialects/cockroachdb/grammar
- test/kotlin/com/faire/sqldelight/dialects/cockroachdb
- gradle
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
190 | 200 | | |
191 | 201 | | |
192 | 202 | | |
| |||
Lines changed: 134 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
26 | 46 | | |
27 | | - | |
28 | 47 | | |
29 | 48 | | |
30 | 49 | | |
31 | 50 | | |
32 | 51 | | |
33 | 52 | | |
34 | | - | |
35 | | - | |
36 | 53 | | |
37 | 54 | | |
38 | 55 | | |
| |||
41 | 58 | | |
42 | 59 | | |
43 | 60 | | |
44 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
45 | 72 | | |
46 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
47 | 80 | | |
48 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
49 | 85 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
54 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
55 | 115 | | |
56 | 116 | | |
57 | 117 | | |
58 | | - | |
59 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
60 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
61 | 183 | | |
62 | 184 | | |
63 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments