Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: add endtoend
  • Loading branch information
orisano committed Aug 28, 2023
commit d49dc49b19a4ea08b9d0574b1bc452323a86d6fd
31 changes: 31 additions & 0 deletions internal/endtoend/testdata/ddl_create_procedure/mysql/go/db.go

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

13 changes: 13 additions & 0 deletions internal/endtoend/testdata/ddl_create_procedure/mysql/go/models.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.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- name: CallInsertData :exec
CALL insert_data(?, ?);

-- name: CallInsertDataNoArgs :exec
CALL insert_data(1, 2);

-- name: CallInsertDataSqlcArgs :exec
CALL insert_data(sqlc.arg('foo'), sqlc.arg('bar'));
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CREATE TABLE tbl (
value int
);

CREATE PROCEDURE insert_data(a int, b int)
BEGIN
INSERT INTO tbl VALUES (a);
INSERT INTO tbl VALUES (b);
END;
12 changes: 12 additions & 0 deletions internal/endtoend/testdata/ddl_create_procedure/mysql/sqlc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "1",
"packages": [
{
"path": "go",
"engine": "mysql",
"name": "querytest",
"schema": "schema.sql",
"queries": "query.sql"
}
]
}