-
Notifications
You must be signed in to change notification settings - Fork 813
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: add override tags to result struct (#1867) * Update test output for latest version --------- Co-authored-by: Kyle Conroy <kyle@conroy.org>
- Loading branch information
1 parent
97e7e57
commit ee391e6
Showing
6 changed files
with
123 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
31 changes: 31 additions & 0 deletions
31
internal/endtoend/testdata/overrides_result_tag/stdlib/go/db.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/overrides_result_tag/stdlib/go/models.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
internal/endtoend/testdata/overrides_result_tag/stdlib/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.
20 changes: 20 additions & 0 deletions
20
internal/endtoend/testdata/overrides_result_tag/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,20 @@ | ||
CREATE TABLE public.accounts ( | ||
id uuid DEFAULT public.uuid_generate_v4() NOT NULL, | ||
state character varying | ||
); | ||
|
||
CREATE TABLE public.users_accounts ( | ||
ID2 uuid DEFAULT public.uuid_generate_v4() NOT NULL, | ||
name character varying | ||
); | ||
|
||
-- name: FindAccount :one | ||
SELECT | ||
a.*, | ||
ua.name | ||
-- other fields | ||
FROM | ||
accounts a | ||
INNER JOIN users_accounts ua ON a.id = ua.id2 | ||
WHERE | ||
a.id = @account_id; |
12 changes: 12 additions & 0 deletions
12
internal/endtoend/testdata/overrides_result_tag/stdlib/sqlc.yaml
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,12 @@ | ||
version: "2" | ||
sql: | ||
- schema: "query.sql" | ||
queries: "query.sql" | ||
engine: "postgresql" | ||
gen: | ||
go: | ||
package: "querytest" | ||
out: "go" | ||
overrides: | ||
- column: accounts.id | ||
go_struct_tag: sometagtype:"some_value" |