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 quotes when using schema in the tablename #1710

Closed
gel-hidden opened this issue Mar 22, 2023 · 4 comments
Closed

Support quotes when using schema in the tablename #1710

gel-hidden opened this issue Mar 22, 2023 · 4 comments

Comments

@gel-hidden
Copy link

The function String.isAlreadyQuoted() in IdentifierManagerApi uses the following logic:

private fun String.isAlreadyQuoted() = startsWith(quoteString) && endsWith(quoteString)

Which does not work for schema."MyTable".

@gel-hidden
Copy link
Author

It is possible to just change the name to "schema"."MyTable" to fulfill the condition.

@bog-walk
Copy link
Member

@gel-hidden Changes were made recently to Table and how it handles schema and table names (PR #1678).
So I'm not getting any issue when using a table name like in your example:

object TestTable : Table("tester.\"MyTable\"") { //... }

object TestTable : Table("\"Tester\".\"MyTable\"") { //... }

// both ways work (create, insert, select, drop)

Please confirm whether this issue persists for you with current version 0.44.0.
If it does, please consider sharing an example of a table object, the database being used, and any exceptions that you're seeing.

@bog-walk
Copy link
Member

If the issue persists, please consider reopening this issue on YouTrack with the details requested above, so we can attempt to investigate further.

@gel-hidden
Copy link
Author

This issue does not persist for 0.44.0.

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

2 participants