tursodatabase / libsql

libSQL is a fork of SQLite that is both Open Source, and Open Contributions.
https://turso.tech/libsql
MIT License
9.54k stars 252 forks source link

add preserve_rowids query parameter to align with native SQLite shell feature #1609

Closed sivukhin closed 2 months ago

sivukhin commented 2 months ago

Context

SQLite support several arguments for dump command and preserve-rowids is one of them:

.help .dump
.dump ?OBJECTS?          Render database content as SQL
   Options:
     --data-only            Output only INSERT statements
     --newlines             Allow unescaped newline characters in output
     --nosys                Omit system tables (ex: "sqlite_stat1")
     --preserve-rowids      Include ROWID values in the output
   OBJECTS is a LIKE pattern for tables, indexes, triggers or views to dump
   Additional LIKE patterns can be given in subsequent arguments

It can be particularly useful for vector indices because internally they use ROWID by default and internal index on-disk data contains ROWID values