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

[SQLite, Turso]: Avoid wrapping SQL expressions in backticks for index generation #3962

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bondehagen
Copy link

This PR addresses an issue in the CreateSqliteIndexConvertor where the code incorrectly treated all columns as plain identifiers, wrapping them in backticks.

The fix checks the isExpression property in the internal.indexes object and ensures that:

  • SQL expressions are left untouched.
  • Plain column names are still correctly escaped with backticks.

Fixes #3350 (which should not have been closed yet).

@bondehagen bondehagen changed the title Avoid wrapping SQL expressions in backticks for SQLite index generation [SQLite, Turso]: Avoid wrapping SQL expressions in backticks for index generation Jan 17, 2025
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

Successfully merging this pull request may close these issues.

using COALESCE when making an index, escapes the comma in the function
1 participant