Closed CodingDoug closed 11 months ago
Paste the following into the shell, and it works OK:
/* comment */ select 1;
And this works OK:
/* comment; */ select 1;
However, this does not work (note the semicolon and newline within the block comment):
Error:
Error: failed to execute SQL: */ select 1; near STAR, "None": syntax error at (1, 2)
However, the same SQL above does work if the text is placed in a file and redirected to stdin:
# test.sql contains the same SQL as above $ turso db shell my-db < test.sql 1 1
The practical use case is using a block comments to remove bits of SQL from a script, then copy/pasting that script into the shell.
See also #135
Paste the following into the shell, and it works OK:
And this works OK:
However, this does not work (note the semicolon and newline within the block comment):
Error:
However, the same SQL above does work if the text is placed in a file and redirected to stdin:
The practical use case is using a block comments to remove bits of SQL from a script, then copy/pasting that script into the shell.
See also #135