tursodatabase / turso-cli

Command line interface to Turso.
https://turso.tech
MIT License
215 stars 35 forks source link

Shell `.dump` outputs invalid SQL ending in "NULL;" #455

Closed CodingDoug closed 1 year ago

CodingDoug commented 1 year ago

We have a shell command .dump that you can use like this to output SQL commands that should reconstruct a database:

turso db shell $DBNAME .dump > dumpfile.sql

When I go to load the SQL back into a database:

turso db shell $DBNAME < dumpfile.sql

It gives an error on the trailing NULL;

Error: failed to execute SQL: NULL;
near NULL, "None": syntax error at (1, 5)

That null also makes sqlite3 fail when using .read.

CodingDoug commented 1 year ago

Closing in favor of https://github.com/libsql/libsql-shell-go/issues/118