-
Notifications
You must be signed in to change notification settings - Fork 832
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sqlite): Correctly skip unknown statements (#3239)
* fix(sqlite): Correctly skip unknown statements Without updating loc, the unknown statement would be included in the text of the next query. * Pick sqlc-gen-typescript to a release
- Loading branch information
1 parent
b8160b5
commit 014d6fc
Showing
8 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
internal/endtoend/testdata/sqlite_skip_todo/db/query.sql.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- name: PragmaForeignKeysEnable :exec | ||
PRAGMA foreign_keys = 1; | ||
|
||
-- name: ListFoo :many | ||
SELECT * FROM foo; | ||
|
||
-- name: PragmaForeignKeysDisable :exec | ||
PRAGMA foreign_keys = 0; | ||
|
||
-- name: PragmaForeignKeysGet :one | ||
PRAGMA foreign_keys; | ||
|
||
-- name: GetFoo :many | ||
SELECT * FROM foo | ||
WHERE bar = ?; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
CREATE TABLE foo ( | ||
bar text | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"version": "2", | ||
"sql": [ | ||
{ | ||
"engine": "sqlite", | ||
"queries": "query.sql", | ||
"schema": "schema.sql", | ||
"gen": { | ||
"go": { | ||
"package": "db", | ||
"out": "db" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters