Skip to content

fix(engine/sqlite): support NOT IN #2587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions internal/endtoend/testdata/sqlc_slice/mysql/go/query.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions internal/endtoend/testdata/sqlc_slice/mysql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ WHERE id IN (sqlc.slice(favourites));
SELECT bar FROM foo
WHERE id IN (sqlc.slice('favourites'));

/* name: FuncNullableNot :many */
SELECT bar FROM foo
WHERE id NOT IN (sqlc.slice('favourites'));

/* name: TypedMyStr :many */
SELECT bar FROM foo
WHERE mystr IN (sqlc.slice(mystr));
38 changes: 38 additions & 0 deletions internal/endtoend/testdata/sqlc_slice/sqlite/go/query.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion internal/endtoend/testdata/sqlc_slice/sqlite/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ WHERE id IN (sqlc.slice(favourites));

/* name: FuncNullable :many */
SELECT bar FROM foo
WHERE id IN (sqlc.slice('favourites'));
WHERE id IN (sqlc.slice('favourites'));

/* name: FuncNullableNot :many */
SELECT bar FROM foo
WHERE id NOT IN (sqlc.slice('favourites'));
2 changes: 1 addition & 1 deletion internal/engine/sqlite/parser/SQLiteParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ expr:
| NOT_EQ2
| IS_
| IS_ NOT_
| IN_
| NOT_? IN_
| LIKE_
| GLOB_
| MATCH_
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/sqlite/parser/SQLiteParser.interp

Large diffs are not rendered by default.

3,132 changes: 1,573 additions & 1,559 deletions internal/engine/sqlite/parser/sqlite_parser.go

Large diffs are not rendered by default.