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
Next Next commit
test: add a test case for #1654
  • Loading branch information
andrewmbenton committed Oct 16, 2023
commit 4eb82969aa77afbc726262e20b69aa336278d442
1 change: 1 addition & 0 deletions internal/endtoend/testdata/func_out_param/issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/sqlc-dev/sqlc/issues/1654
4 changes: 4 additions & 0 deletions internal/endtoend/testdata/func_out_param/pgx/query.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- name: CreateAuthor :one
SELECT * FROM add_author (
sqlc.arg(name), sqlc.arg(bio)
);
14 changes: 14 additions & 0 deletions internal/endtoend/testdata/func_out_param/pgx/schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- Example queries for sqlc
CREATE TABLE authors (
id BIGSERIAL PRIMARY KEY,
name text NOT NULL,
bio text
);

CREATE OR REPLACE FUNCTION add_author (name text, bio text, out id int)
AS $$
DECLARE
BEGIN
id = 123;
END;
$$ LANGUAGE plpgsql;
14 changes: 14 additions & 0 deletions internal/endtoend/testdata/func_out_param/pgx/sqlc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "2"
cloud:
project: "01HAQMMECEYQYKFJN8MP16QC41"
sql:
- engine: "postgresql"
schema: "schema.sql"
queries: "query.sql"
gen:
go:
package: "querytest"
out: "go"
sql_package: "pgx/v5"
database:
managed: true