fix sql insert syntax#28717
Conversation
|
/bonk review this |
There was a problem hiding this comment.
LGTM. In SQL, double quotes denote identifiers (column/table names), while single quotes denote string literals. The original "foo@bar.com" causes SQLite to look for a column named foo@bar.com, which fails. Changing to single quotes is the correct fix.
|
Approved the PR. The fix is correct: in SQL, double quotes ( |
|
Hey there, we've marked this pull request as stale because there's no recent activity on it. This label is helps us identify PRs that might need updates (or to be closed out by our team if no longer relevant). |
|
/bonk update this to also point to the latest instructions for tursodb which involve the CLI instructions here https://github.com/tursodatabase/turso (brew install turso) and the binary |
There was a problem hiding this comment.
LGTM. The fix correctly changes SQL string literals from double quotes to single quotes. In SQLite, double quotes are for identifiers (column/table names) while single quotes are for string values. The original code would fail with no such column: foo@bar.com.
|
Approved. The SQL syntax fix is correct - single quotes are the proper way to denote string literals in SQLite. |
Verify that this is actually what you want. Turso db and Turso cloud are not the same thing. I don't think the rest of the guide makes much sense in the context of Turso db. |
Understood! Definitely want this to focus on the cloud option, sorry. Fixing this up now to just correct our install options. Edit: I'll just make these changes separately rather than bundling them in with this which is a nice small change! |
There was a problem hiding this comment.
LGTM. This is a correct SQL syntax fix. Double quotes are for identifiers (column/table names) in SQLite, while single quotes are for string literals. The original "foo@bar.com" would cause SQLite to look for a column named foo@bar.com rather than inserting it as a string value.
|
Review submitted and approved. The SQL syntax fix is correct and necessary. In SQLite (which Turso uses), double quotes are reserved for identifiers (column/table names) while single quotes denote string literals. The original code would cause an error because SQLite interprets |
Summary
"foo@bar.com" is an identifier not a string.
updated to single quotes.
Replaces #28698 which I closed accidentally 😅