-
Notifications
You must be signed in to change notification settings - Fork 727
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(analyzer): Add testcase for #1574
- Loading branch information
1 parent
9de196f
commit 035e0f8
Showing
8 changed files
with
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://github.com/sqlc-dev/sqlc/issues/1574 |
3 changes: 3 additions & 0 deletions
3
internal/endtoend/testdata/min_max_date/postgresql/pgx/exec.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,3 @@ | ||
{ | ||
"contexts": ["managed-db"] | ||
} |
32 changes: 32 additions & 0 deletions
32
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.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
internal/endtoend/testdata/min_max_date/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.
33 changes: 33 additions & 0 deletions
33
internal/endtoend/testdata/min_max_date/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: 6 additions & 0 deletions
6
internal/endtoend/testdata/min_max_date/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 |
---|---|---|
@@ -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; |
4 changes: 4 additions & 0 deletions
4
internal/endtoend/testdata/min_max_date/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 |
---|---|---|
@@ -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
10
internal/endtoend/testdata/min_max_date/postgresql/pgx/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,10 @@ | ||
version: "2" | ||
sql: | ||
- engine: "postgresql" | ||
schema: "schema.sql" | ||
queries: "query.sql" | ||
gen: | ||
go: | ||
package: "querytest" | ||
out: "go" | ||
sql_package: "pgx/v5" |