clienhancementhelp wanted
Repository-Metriken
- Stars
- (886 Sterne)
- PR-Merge-Metriken
- (Keine gemergten PRs in 30 T)
Beschreibung
If we run the following command:
rows query 'SELECT * FROM table1 WHERE field1="value1"' filename.sqlite --output=out.sqlite
the CLI will:
- Connect to a SQLite database named
filename.sqlitesince there's only one source and it's format is SQLite - Import the SQLite result into a
rows.Tablerunning the query - Export the result
rows.Tableinto a new SQLite database namedout.sqlite
We can optimize this use case replacing the steps with the following:
- Connect to a SQLite database named
filename.sqlitesince there's only one source and its format is SQLite - Attach the output database with SQLite's
ATTACHSQL command - Change the query to have
INSERT INTO(to add result to the new database) - Run the query
More details on ATTACH in StackOverflow this thread.