-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle untyped sqlite columns without crashing. Fixes #2279
- Loading branch information
1 parent
c13b156
commit 9495460
Showing
6 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/db.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
internal/endtoend/testdata/untyped_columns/sqlite/stdlib/db/models.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
internal/endtoend/testdata/untyped_columns/sqlite/stdlib/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.
5 changes: 5 additions & 0 deletions
5
internal/endtoend/testdata/untyped_columns/sqlite/stdlib/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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- original table name in sqlite schema was sqlite_sequence, rest of def is identical | ||
create table repro(id, name, seq); | ||
|
||
-- name: GetRepro :one | ||
select * from repro where id = ? limit 1; |
16 changes: 16 additions & 0 deletions
16
internal/endtoend/testdata/untyped_columns/sqlite/stdlib/sqlc.json
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", | ||
"schema": "query.sql", | ||
"queries": "query.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