Skip to content

Commit

Permalink
test(analyzer): Add testcase for #1574
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleconroy committed Oct 16, 2023
1 parent 9de196f commit 035e0f8
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/endtoend/testdata/min_max_date/issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/sqlc-dev/sqlc/issues/1574
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"contexts": ["managed-db"]
}
32 changes: 32 additions & 0 deletions internal/endtoend/testdata/min_max_date/postgresql/pgx/go/db.go

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

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

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- name: ActivityStats :one
SELECT COUNT(*) as NumOfActivities,
MIN(event_time) as MinDate,
MAX(event_time) as MaxDate
FROM activities
WHERE account_id = $1;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CREATE TABLE activities (
account_id BIGINT NOT NULL,
event_time TIMESTAMP WITH TIME ZONE NOT NULL
);
10 changes: 10 additions & 0 deletions internal/endtoend/testdata/min_max_date/postgresql/pgx/sqlc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "2"
sql:
- engine: "postgresql"
schema: "schema.sql"
queries: "query.sql"
gen:
go:
package: "querytest"
out: "go"
sql_package: "pgx/v5"

0 comments on commit 035e0f8

Please sign in to comment.