Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for psql-like parameters (:parameter) #42

Closed
ghost opened this issue Oct 4, 2021 · 1 comment
Closed

Support for psql-like parameters (:parameter) #42

ghost opened this issue Oct 4, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 4, 2021

In order for the .sql files to be tested by a regression tool, e.g. regresql, it would be nice, if the psql-like parameters could be supported.

So, the following SQL statements should be equal:

-- name: CurrentVersion :one
select name from albums where id = pggen.arg('id');

-- name: NewVersion :one
select name from albums where id = :id;
@jschaf
Copy link
Owner

jschaf commented May 22, 2022

One of the goals I'm shooting for with pggen is to limit the number of knobs and being okay with using another tool for tweaks like this. I'll keep pggen with a single input syntax for now.

For your use case, using sed would probably work, though admittedly less convenient than if it was built into pggen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant