@var1, @var2 vs $1, $2
swuecho opened this issue · 2 comments
swuecho commented
I am trying to auto generated F# code with a custom sqlc plugin.
The sql in sqlc use $1 as placeholder. https://play.sqlc.dev/
let getJwtSecret = """-- name: GetJwtSecret :one
SELECT id, name, secret, audience FROM jwt_secrets WHERE name = $1
""";
in npgsql.Fsharp @var
is required. Is it possible to use $1 style placeholder?
let getJwtSecret = """-- name: GetJwtSecret :one
SELECT id, name, secret, audience FROM jwt_secrets WHERE name = @name
""";
swuecho commented
swuecho commented
find a solution using the parsed query. https://github.com/swuecho/sqlc-fs/pull/5/files