bytebase / bytebase

The GitHub/GitLab for database DevOps. World's most advanced database DevOps and CI/CD for Developer, DBA and Platform Engineering teams.

Home Page:https://www.bytebase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Editor should escape column names

artman opened this issue · comments

Is your feature request related to a problem?

We're using Postgres and somewhat unconventionally have our column names camel cased (to be aligned with our TypeScript schema). This makes it hard to write queries in an editor that doesn't support automatically putting camel cased identifiers with quotation marks (e.g. SELECT * FROM issue WHERE "createdAt" IS NOT NULL) when selecting column names from auto-completion.

This also makes AI generated queries less useful since camel cased columns aren't quoted and thus the generated SQL isn't valid.

Describe the solution you'd like

When selecting column names that are camel cased from auto-completion or when using AI, the editor should automatically surround them in quotes.

Additional context

No response

Thanks for the reporting. We will take a look.

#10562 has changed the prompts. Meanwhile, we're addressing the auto-completion in a separate change.

All working nicely now.