-
Notifications
You must be signed in to change notification settings - Fork 837
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler): Skip analysis of queries without a
name
annotation (#…
…3072) * fix(compiler): Skip analysis of queries without a `name` annotation Also update tests to work with new behavior * Only run builtins test in base context for now
- Loading branch information
1 parent
94c460d
commit f0184bc
Showing
58 changed files
with
819 additions
and
7 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
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": ["base"] | ||
} |
274 changes: 274 additions & 0 deletions
274
internal/endtoend/testdata/builtins/postgresql/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.
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 |
---|---|---|
@@ -1,25 +1,48 @@ | ||
-- name: Abs :one | ||
SELECT abs(-17.4); | ||
-- name: Cbrt :one | ||
SELECT cbrt(27.0); | ||
-- name: Ceil :one | ||
SELECT ceil(-42.8); | ||
-- name: Ceiling :one | ||
SELECT ceiling(-95.3); | ||
-- name: Degrees :one | ||
SELECT degrees(0.5); | ||
-- name: Div :one | ||
SELECT div(9,4); | ||
-- name: Exp :one | ||
SELECT exp(1.0); | ||
-- name: Floor :one | ||
SELECT floor(-42.8); | ||
-- name: Ln :one | ||
SELECT ln(2.0); | ||
-- name: Log :one | ||
SELECT log(100.0); | ||
-- name: Logs :one | ||
SELECT log(2.0, 64.0); | ||
-- name: Mod :one | ||
SELECT mod(9,4); | ||
-- name: Pi :one | ||
SELECT pi(); | ||
-- name: Power :one | ||
SELECT power(9.0, 3.0); | ||
-- name: Radians :one | ||
SELECT radians(45.0); | ||
-- name: Round :one | ||
SELECT round(42.4); | ||
-- name: Rounds :one | ||
SELECT round(42.4382, 2); | ||
-- name: Scale :one | ||
SELECT scale(8.41); | ||
-- name: Sign :one | ||
SELECT sign(-8.4); | ||
-- name: Sqrt :one | ||
SELECT sqrt(2.0); | ||
-- name: Trunc :one | ||
SELECT trunc(42.8); | ||
-- name: Truncs :one | ||
SELECT trunc(42.4382, 2); | ||
-- name: WidthBucketNumerics :one | ||
SELECT width_bucket(5.35, 0.024, 10.06, 5); | ||
-- name: WidthBucketTimestamps :one | ||
SELECT width_bucket(now(), array['yesterday', 'today', 'tomorrow']::timestamptz[]); | ||
create schema if not exists sqlc; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
-- name: Test :one | ||
SELECT 1; |
21 changes: 21 additions & 0 deletions
21
internal/endtoend/testdata/datatype/pgx/v4/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.
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
-- name: Test :one | ||
SELECT 1; |
Oops, something went wrong.