-
Notifications
You must be signed in to change notification settings - Fork 833
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(engine/sqlite): fixed IN operator precedence (#2428)
* fix(engine/sqlite): fixed IN operator precedence close #2368 * test: add endtoend * chore: v1.19.1 * Regenerate parser --------- Co-authored-by: Kyle Conroy <[email protected]>
- Loading branch information
1 parent
6d3cdc2
commit 5ffe722
Showing
8 changed files
with
351 additions
and
205 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
internal/endtoend/testdata/select_in_and/sqlite/go/models.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
internal/endtoend/testdata/select_in_and/sqlite/go/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,41 @@ | ||
-- Example queries for sqlc | ||
CREATE TABLE authors ( | ||
id integer PRIMARY KEY, | ||
name text NOT NULL, | ||
age integer | ||
); | ||
|
||
CREATE TABLE translators ( | ||
id integer PRIMARY KEY, | ||
name text NOT NULL, | ||
age integer | ||
); | ||
|
||
CREATE TABLE books ( | ||
id integer PRIMARY KEY, | ||
author text NOT NULL, | ||
translator text NOT NULL, | ||
year integer | ||
); | ||
|
||
-- name: DeleteAuthor :exec | ||
DELETE FROM | ||
books AS b | ||
WHERE | ||
b.author NOT IN ( | ||
SELECT | ||
a.name | ||
FROM | ||
authors a | ||
WHERE | ||
a.age >= ? | ||
) | ||
AND b.translator NOT IN ( | ||
SELECT | ||
t.name | ||
FROM | ||
translators t | ||
WHERE | ||
t.age >= ? | ||
) | ||
AND b.year <= ?; |
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 @@ | ||
{"version": "1", "packages": [{"path": "go", "engine": "sqlite", "schema": "query.sql", "queries": "query.sql", "name": "querytest"}]} |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.