Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"insert-files --sqlar" for creating SQLite archives #129

Closed
simonw opened this issue Jul 30, 2020 · 2 comments
Closed

"insert-files --sqlar" for creating SQLite archives #129

simonw opened this issue Jul 30, 2020 · 2 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@simonw
Copy link
Owner

simonw commented Jul 30, 2020

A --sqlar option could cause insert-files to behave in the same way as SQLite's own sqlar mechanism.

https://www.sqlite.org/sqlar.html and https://sqlite.org/sqlar/doc/trunk/README.md

@simonw simonw added the enhancement New feature or request label Jul 30, 2020
@simonw
Copy link
Owner Author

simonw commented Jul 30, 2020

@simonw
Copy link
Owner Author

simonw commented Jul 30, 2020

This should be a separate command from insert-files. SQLite Archives should use a table with this schema:

CREATE TABLE sqlar(
  name TEXT PRIMARY KEY,  -- name of the file
  mode INT,               -- access permissions
  mtime INT,              -- last modification time
  sz INT,                 -- original file size
  data BLOB               -- compressed content
);

insert-files currently treats the table name as a required argument - but it's not necessary for this table. Also there shouldn't be any support for the --column option.

So if I write this command it should be this instead:

sqlite-utils sqlar files.db file.txt file2.txt

But at that point, why bother? Users can use sqlite3 files.db -Ac *.txt instead.

So I'm not going to bother implementing this.

@simonw simonw closed this as completed Jul 30, 2020
@simonw simonw added the wontfix This will not be worked on label Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant