Skip to content

Parameterized Identifiers #48

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

Closed
stevehogdahl opened this issue Nov 7, 2019 · 1 comment
Closed

Parameterized Identifiers #48

stevehogdahl opened this issue Nov 7, 2019 · 1 comment

Comments

@stevehogdahl
Copy link

I'm trying to run the following query for dynamic sorting.

SELECT * FROM tenant ORDER BY ??column DESC
{ column: 'industry' }

I get the following error though.

BadRequestException: ERROR: operator does not exist: ` character varying
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.

I found out this is because the escapeId escapes these identifiers as column and postgres does not support backticks. From postgres's website:

MySQL uses ` (accent mark or backtick) to quote system identifiers, which is decidedly non-standard.

Can the ID_GLOBAL_REGEXP constant be configurable?

@dougwilson
Copy link
Member

Supporting dialects other than MySQL is outside the scope of this module.

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

No branches or pull requests

2 participants