Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
100 changes: 100 additions & 0 deletions internal/endtoend/testdata/pg_timezone_names/go_pgx/query.sql.go

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

109 changes: 109 additions & 0 deletions internal/endtoend/testdata/pg_timezone_names/go_stdlib/query.sql.go

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

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 8 additions & 0 deletions internal/endtoend/testdata/pg_timezone_names/query.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- name: GetTimezones :many
SELECT * from pg_catalog.pg_timezone_names;

-- name: GetTables :many
SELECT table_name::text from information_schema.tables;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to cast these to ::text since I think the information_schema uses a database type that is not currently recognized by sqlc (it used interface{}). It might be a simple fix to change that.


-- name: GetColumns :many
SELECT table_name::text, column_name::text from information_schema.columns;
28 changes: 28 additions & 0 deletions internal/endtoend/testdata/pg_timezone_names/sqlc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "2",
"sql": [
{
"engine": "postgresql",
"schema": "query.sql",
"queries": "query.sql",
"gen": {
"go": {
"sql_package": "pgx/v4",
"package": "querytest",
"out": "go_pgx"
}
}
},
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kyleconroy I found that undoing the nesting (and using multiple sql array elements, made these things a lot easier to test.

{
"engine": "postgresql",
"schema": "query.sql",
"queries": "query.sql",
"gen": {
"go": {
"package": "querytest",
"out": "go_stdlib"
}
}
}
]
}