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

Lack of quotation usage #20

Open
SwordOfSouls opened this issue Oct 30, 2024 · 3 comments
Open

Lack of quotation usage #20

SwordOfSouls opened this issue Oct 30, 2024 · 3 comments
Assignees
Labels
bug Something isn't working waiting for upstream This is a bug in a library dependency

Comments

@SwordOfSouls
Copy link

None of the DAO generated queries utilize SQL quotation. This becomes problematic in various situations, but, is most visible when table names utilize built in symbols.

Example -
The statement select user.legalName, user.internalEmail, user.id from user LIMIT 1 OFFSET 0
results in org.jdbi.v3.core.statement.UnableToExecuteStatementException: org.postgresql.util.PSQLException: ERROR: syntax error at or near "."

This would be fixed by simply adding quotations.
SELECT "user"."legal_name", "user"."internal_email", "user"."id" FROM "user" LIMIT 1 OFFSET 0

@mvysny mvysny self-assigned this Oct 30, 2024
@mvysny mvysny added the bug Something isn't working label Oct 30, 2024
@mvysny
Copy link
Owner

mvysny commented Oct 30, 2024

Hi, which database is it, Postgres?

@SwordOfSouls
Copy link
Author

Appreciate the response. Postgres is used in this example.

@mvysny
Copy link
Owner

mvysny commented Nov 1, 2024

Thanks for confirming. vok-orm doesn't support quoted selects at the moment and this needs to be added as a feature to jdbi-orm. Could you please open a feature request at https://gitlab.com/mvysny/jdbi-orm and add an example code (SQL DDL + a Table class + a sample code) which works with quotations but fails without those?

@mvysny mvysny added the waiting for upstream This is a bug in a library dependency label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for upstream This is a bug in a library dependency
Projects
None yet
Development

No branches or pull requests

2 participants