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

PREPARE, EXECUTE and DEALLOCATE are not top-level statements #242

Closed
silathdiir opened this issue Jul 27, 2020 · 1 comment · Fixed by #243
Closed

PREPARE, EXECUTE and DEALLOCATE are not top-level statements #242

silathdiir opened this issue Jul 27, 2020 · 1 comment · Fixed by #243
Labels
help wanted Extra attention is needed

Comments

@silathdiir
Copy link
Contributor

Hi, I am using this crate to parse SQLs, and working on Postgres Extended Query. e.g.

prepare stmt (smallint) AS select * from schema_name.table_name where si_column_2 = $1;
execute stmt(1, 2);
deallocate stmt;

I tried to find solutions by Dialect, but it seems that PREPARE, EXECUTE and DEALLOCATE are not top-level statements.

Should they be added as top-level statements? Or there are other better solutions. Thanks.

@nickolay
Copy link
Contributor

Yes, adding them as new Statement variants is how we do that. Please note that it's Postgres-specific syntax in the comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants