Skip to content

Commit

Permalink
test: add endtoend
Browse files Browse the repository at this point in the history
  • Loading branch information
orisano committed Aug 15, 2023
1 parent bf3b0f7 commit c95913d
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 0 deletions.
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"
}
]
}

0 comments on commit c95913d

Please sign in to comment.