Skip to content

Commit 20fda73

Browse files
authored
test: Fix a few incorrect testcases (#2804)
These test cases weren't valid when sent to a running PostgreSQL database.
1 parent 5664224 commit 20fda73

File tree

14 files changed

+30
-30
lines changed

14 files changed

+30
-30
lines changed

internal/endtoend/testdata/any/pgx/v4/go/query.sql.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-- name: Any :many
22
SELECT id
33
FROM bar
4-
WHERE foo = ANY($1::bigserial[]);
4+
WHERE id = ANY($1::bigint[]);

internal/endtoend/testdata/any/pgx/v5/go/query.sql.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-- name: Any :many
22
SELECT id
33
FROM bar
4-
WHERE foo = ANY($1::bigserial[]);
4+
WHERE id = ANY($1::bigint[]);

internal/endtoend/testdata/any/stdlib/go/query.sql.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-- name: Any :many
22
SELECT id
33
FROM bar
4-
WHERE foo = ANY($1::bigserial[]);
4+
WHERE id = ANY($1::bigint[]);

internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/go/query.sql.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/endtoend/testdata/comment_godoc/postgresql/pgx/v4/query.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ SELECT * FROM foo;
88

99
-- name: ExecFoo :exec
1010
-- This function creates a Foo via :exec
11-
INSERT INTO foo (bar) VALUES ("bar");
11+
INSERT INTO foo (bar) VALUES ('bar');
1212

1313
-- name: ExecRowFoo :execrows
1414
-- This function creates a Foo via :execrows
15-
INSERT INTO foo (bar) VALUES ("bar");
15+
INSERT INTO foo (bar) VALUES ('bar');
1616

1717
-- name: ExecResultFoo :execresult
1818
-- This function creates a Foo via :execresult
19-
INSERT INTO foo (bar) VALUES ("bar");
19+
INSERT INTO foo (bar) VALUES ('bar');

internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/go/query.sql.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/endtoend/testdata/comment_godoc/postgresql/pgx/v5/query.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ SELECT * FROM foo;
88

99
-- name: ExecFoo :exec
1010
-- This function creates a Foo via :exec
11-
INSERT INTO foo (bar) VALUES ("bar");
11+
INSERT INTO foo (bar) VALUES ('bar');
1212

1313
-- name: ExecRowFoo :execrows
1414
-- This function creates a Foo via :execrows
15-
INSERT INTO foo (bar) VALUES ("bar");
15+
INSERT INTO foo (bar) VALUES ('bar');
1616

1717
-- name: ExecResultFoo :execresult
1818
-- This function creates a Foo via :execresult
19-
INSERT INTO foo (bar) VALUES ("bar");
19+
INSERT INTO foo (bar) VALUES ('bar');

internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/go/query.sql.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v4/query.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ SELECT * FROM foo;
88

99
-- name: ExecFoo :exec
1010
-- This function creates a Foo via :exec
11-
INSERT INTO foo (bar) VALUES ("bar");
11+
INSERT INTO foo (bar) VALUES ('bar');
1212

1313
-- name: ExecRowFoo :execrows
1414
-- This function creates a Foo via :execrows
15-
INSERT INTO foo (bar) VALUES ("bar");
15+
INSERT INTO foo (bar) VALUES ('bar');
1616

1717
-- name: ExecResultFoo :execresult
1818
-- This function creates a Foo via :execresult
19-
INSERT INTO foo (bar) VALUES ("bar");
19+
INSERT INTO foo (bar) VALUES ('bar');

internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/go/query.sql.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/endtoend/testdata/comment_godoc_db_argument/postgresql/pgx/v5/query.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ SELECT * FROM foo;
88

99
-- name: ExecFoo :exec
1010
-- This function creates a Foo via :exec
11-
INSERT INTO foo (bar) VALUES ("bar");
11+
INSERT INTO foo (bar) VALUES ('bar');
1212

1313
-- name: ExecRowFoo :execrows
1414
-- This function creates a Foo via :execrows
15-
INSERT INTO foo (bar) VALUES ("bar");
15+
INSERT INTO foo (bar) VALUES ('bar');
1616

1717
-- name: ExecResultFoo :execresult
1818
-- This function creates a Foo via :execresult
19-
INSERT INTO foo (bar) VALUES ("bar");
19+
INSERT INTO foo (bar) VALUES ('bar');

0 commit comments

Comments
 (0)