csvs-to-sqlite 0.6
SQLite full-text search support
-
Added
--ftsoption for setting up SQLite full-text search.The
--ftsoption will create a corresponding SQLite FTS virtual table, using
the best available version of the FTS module.https://sqlite.org/fts5.html
https://www.sqlite.org/fts3.htmlUsage:
csvs-to-sqlite my-csv.csv output.db -f column1 -f column2Example generated with this option: https://sf-trees-search.now.sh/
Will be used in simonw/datasette#131
-
--ftsand--extract-columnnow cooperate.If you extract a column and then specify that same column in the
--ftslist,
csvs-to-sqlitenow uses the original value of that column in the index.Example using CSV from https://data.sfgov.org/City-Infrastructure/Street-Tree-List/tkzw-k3nq
csvs-to-sqlite Street_Tree_List.csv trees-fts.db \ -c qLegalStatus -c qSpecies -c qSiteInfo \ -c PlantType -c qCaretaker -c qCareAssistant \ -f qLegalStatus -f qSpecies -f qAddress \ -f qSiteInfo -f PlantType -f qCaretaker \ -f qCareAssistant -f PermitNotesCloses #9
-
Handle column names with spaces in them.
-
Added
csvs-to-sqlite --versionoption.