-
-
Notifications
You must be signed in to change notification settings - Fork 117
CLI utility for inserting binary files into SQLite #122
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
Comments
One idea: It could work something like this:
This would insert those two image files into the database in a table called CREATE TABLE files (
key text primary key,
hash text,
body blob
); The
|
The command also accepts one or more directories, in which case it will recursively scan them for all files that they contain. |
Related: #123 ( |
Maybe support |
I should consider easy compatibility with https://www.sqlite.org/sqlar.html
|
I'm trying to play with
|
This seems to work in creating a SQLite archive containing all
Then listing files like this:
Here's the schema:
|
Test command:
|
Inserting files by piping them in should work - but since a filename cannot be derived this will need a
|
SQLite BLOB columns can store entire binary files. The challenge is inserting them, since they don't neatly fit into JSON objects.
It would be great if the
sqlite-utils
CLI had a trick for helping with this.Inspired by simonw/datasette-media#14
The text was updated successfully, but these errors were encountered: