-
Notifications
You must be signed in to change notification settings - Fork 836
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(codegen/golang): Don't import
"strings"
for sqlc.slice()
with…
- Loading branch information
1 parent
f0184bc
commit ce95162
Showing
5 changed files
with
23 additions
and
8 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
1 change: 1 addition & 0 deletions
1
internal/endtoend/testdata/sqlc_slice/postgresql/pgx/go/models.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
20 changes: 16 additions & 4 deletions
20
internal/endtoend/testdata/sqlc_slice/postgresql/pgx/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.
6 changes: 4 additions & 2 deletions
6
internal/endtoend/testdata/sqlc_slice/postgresql/pgx/query.sql
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
-- name: FuncParamIdent :many | ||
SELECT name FROM foo WHERE name = sqlc.arg(slug); | ||
SELECT name FROM foo WHERE name = sqlc.arg(slug) | ||
AND id IN (sqlc.slice(favourites)); | ||
|
||
-- name: FuncParamString :many | ||
SELECT name FROM foo WHERE name = sqlc.arg('slug'); | ||
SELECT name FROM foo WHERE name = sqlc.arg('slug') | ||
AND id IN (sqlc.slice('favourites')); |
2 changes: 1 addition & 1 deletion
2
internal/endtoend/testdata/sqlc_slice/postgresql/pgx/schema.sql
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
CREATE TABLE foo (name text not null); | ||
CREATE TABLE foo (id int not null, name text not null); | ||
|