Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added postgres CALL support * Regenerated endtoend * Converted FuncCall to a pointer
- Loading branch information
Showing
11 changed files
with
168 additions
and
16 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
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
50 changes: 46 additions & 4 deletions
50
internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/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.
13 changes: 9 additions & 4 deletions
13
internal/endtoend/testdata/ddl_create_procedure/postgresql/pgx/query.sql
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,6 +1,11 @@ | ||
-- name: Placeholder :exec | ||
SELECT 1; | ||
-- name: CallInsertData :exec | ||
CALL insert_data($1, $2); | ||
|
||
-- FIXME: Implement CALL | ||
-- name: CallInsertData :select | ||
-- name: CallInsertDataNoArgs :exec | ||
CALL insert_data(1, 2); | ||
|
||
-- name: CallInsertDataNamed :exec | ||
CALL insert_data(b => $1, a => $2); | ||
|
||
-- name: CallInsertDataSqlcArgs :exec | ||
CALL insert_data(sqlc.arg('foo'), sqlc.arg('bar')); |
50 changes: 46 additions & 4 deletions
50
internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/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.
13 changes: 9 additions & 4 deletions
13
internal/endtoend/testdata/ddl_create_procedure/postgresql/stdlib/query.sql
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,6 +1,11 @@ | ||
-- name: Placeholder :exec | ||
SELECT 1; | ||
-- name: CallInsertData :exec | ||
CALL insert_data($1, $2); | ||
|
||
-- FIXME: Implement CALL | ||
-- name: CallInsertData :select | ||
-- name: CallInsertDataNoArgs :exec | ||
CALL insert_data(1, 2); | ||
|
||
-- name: CallInsertDataNamed :exec | ||
CALL insert_data(b => $1, a => $2); | ||
|
||
-- name: CallInsertDataSqlcArgs :exec | ||
CALL insert_data(sqlc.arg('foo'), sqlc.arg('bar')); |
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,12 @@ | ||
package ast | ||
|
||
type CallStmt struct { | ||
FuncCall *FuncCall | ||
} | ||
|
||
func (n *CallStmt) Pos() int { | ||
if n.FuncCall == nil { | ||
return 0 | ||
} | ||
return n.FuncCall.Pos() | ||
} |
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