Open simonw opened 4 years ago
Alternative idea for specifying types: accept a Python expression, then use Python type literal syntax. For example:
sqlite-utils insert-files gifs.db images *.gif \
-c path -c md5 -c last_modified:mtime \
-a file_type '"gif"'
Where -a
indicates an additional column.
Say for example you want to populate a
file_type
column with the valuegif
. That could work like this:So a column defined as a
text
column with a value that follows a second colon.