Commit graph

511 commits

Author SHA1 Message Date
Simon Willison
79a5ece62e Add --convert example to sqlite-utils insert --help, closes #404 2022-02-08 22:55:01 -08:00
Simon Willison
aa24903113 Create table if_not_exists=True argument, closes #397 2022-02-05 17:28:53 -08:00
Simon Willison
482fcc0da7 Fix for flake8, refs #79 2022-02-03 22:13:17 -08:00
Simon Willison
0fe0f476a7 Fix for mypy error, closes #396
Should help tests pass for #395 and #79
2022-02-03 22:10:28 -08:00
Chris Amico
ee11274fcb
New spatialite helper methods, closes #79
- db.init_spatialite()
- table.add_geometry_column()
- table.create_spatial_index()

Co-authored-by: Simon Willison <swillison@gmail.com>
2022-02-03 21:55:09 -08:00
Simon Willison
9dcb099905 Better error messages for --convert, closes #363 2022-02-03 14:51:25 -08:00
Simon Willison
d1d2a8e6fa sqlite-utils bulk --batch-size option, closes #392 2022-01-26 10:15:23 -08:00
Simon Willison
be1e89da5f Fixed flake8 errors 2022-01-25 19:22:06 -08:00
Simon Willison
2b20957b18 Better validation for upsert --pk, closes #390 2022-01-25 19:19:39 -08:00
Simon Willison
4c6023452c Examples in --help for remaining commands, closes #384 2022-01-25 19:14:59 -08:00
Simon Willison
6e85a4bbbe Added examples to more --help output, refs #384 2022-01-25 18:56:44 -08:00
Simon Willison
82ea42ffee Added missing docstring for db.supports_strict 2022-01-24 20:12:32 -08:00
Simon Willison
3091e6b6e9 Clearer help for --drop-foreign-key 2022-01-24 20:06:40 -08:00
Simon Willison
3b632f0a7e sqlite-utils rows --where and -p options, closes #382 2022-01-11 15:32:43 -08:00
Simon Willison
324ebc3130 sqlite-utils rows --limit and --offset options, closes #381 2022-01-11 15:19:29 -08:00
Simon Willison
129141572f
sqlite-utils bulk command
* sqlite-utils bulk command, closes #375
* Refactor import_options and insert_upsert_options, refs #377
* Tests for sqlite-utils bulk, refs #377
* Documentation for sqlite-utils bulk, refs #377
2022-01-10 18:10:54 -08:00
Simon Willison
1b84c175b4 --analyze option for create-index, insert, update commands, closes #379, closes #365 2022-01-10 17:36:41 -08:00
Simon Willison
e0ef9288fe sqlite-utils analyze command, refs #379 2022-01-10 17:24:17 -08:00
Simon Willison
389cbd5792 delete_where(analyze=True), closes #378 2022-01-10 17:08:05 -08:00
Simon Willison
ab392157f7 analyze=True for insert_all/upsert_all, refs #378 2022-01-10 17:00:34 -08:00
Simon Willison
0d10402f7b table.create_index(..., analyze=True), refs #378 2022-01-10 12:00:24 -08:00
Simon Willison
541f64ddb0 db.analyze() and table.analyze() methods, refs #366 2022-01-10 11:48:38 -08:00
Simon Willison
cfb3f12358 Only buffer input if --sniff, closes #364 2022-01-09 20:39:58 -08:00
Simon Willison
d2a79d200f --nl now ignores blank lines, closes #376 2022-01-09 20:12:39 -08:00
Simon Willison
2f8879235a Renamed function to fix lint error, refs #348 2022-01-09 12:39:14 -08:00
Simon Willison
1d64cd2e5b sqlite-utils create-database command, closes #348 2022-01-09 12:33:16 -08:00
Simon Willison
c9ecd0d6a3 stem and suffix columns for insert-files, closes #372 2022-01-09 12:16:52 -08:00
Simon Willison
22c8d10dd3 --convert function can now modify row in place, closes #371 2022-01-09 12:06:02 -08:00
Simon Willison
b8c134059e --fmt now implies --table, closes #374 2022-01-09 10:07:48 -08:00
Simon Willison
539f5ccd90 Support 'python -m sqlite_utils', closes #368
Refs #364
2022-01-08 18:33:22 -08:00
Simon Willison
a8f9cc6f64 Add test for chunks(), refs #364 2022-01-08 13:16:52 -08:00
Simon Willison
a7b29bfaa9 Fixed bug with sqlite-utils upsert --detect-types, closes #362 2022-01-05 22:28:29 -08:00
Simon Willison
413f8ed754 --convert --text for iterators, docs for --convert 2022-01-05 22:24:53 -08:00
Simon Willison
2e4847e493 Implemented --convert for different things, renamed --all to --text 2022-01-05 22:24:53 -08:00
Simon Willison
e66299c6ed Implemented and documented sqlite-utils insert --all 2022-01-05 22:24:53 -08:00
Simon Willison
f1569c9f7f Implemented sqlite-utils insert --lines 2022-01-05 22:24:53 -08:00
Simon Willison
9e286cc6d2 New help for --lines and --all and --convert and --import, refs #356 2022-01-05 22:24:53 -08:00
Simon Willison
500a35ad4d Also support def convert(value), closes #355
Plus added custom syntax error display
2021-12-10 16:49:28 -08:00
Simon Willison
7a43af232e Support nested imports, closes #351 2021-12-10 16:11:22 -08:00
Simon Willison
a3df483c80 sqlite-utils convert db table column -, refs #353 2021-12-10 16:01:02 -08:00
Simon Willison
213a0ff177 Really fix flake8 error, refs #344, #345 2021-11-29 14:34:40 -08:00
Simon Willison
1f8178f7e4 Fix flake8 error, refs #344, #345 2021-11-29 14:29:57 -08:00
Simon Willison
e3f108e0f3 db.supports_strict and table.strict properties, refs #344 2021-11-29 14:19:30 -08:00
Simon Willison
93b21c230a Extra parameters for .lookup(), passed to .insert() - closes #342 2021-11-18 23:26:50 -08:00
Simon Willison
ffb54427d3 insert now replaces square braces in column name with underscore, closes #341 2021-11-14 18:56:35 -08:00
Simon Willison
fb9d61754a Better type signature for hash_id, closes #341 2021-11-14 18:19:28 -08:00
Simon Willison
54a2269e91 Optional second argument to .lookup() to populate extra columns, closes #339 2021-11-14 18:01:56 -08:00
Simon Willison
9cda5b070f Handle dict/tuple/list mapping to TEXT, closes #338 2021-11-14 16:36:00 -08:00
Simon Willison
84007dffa8 Applied Black, refs #322, #328 2021-11-14 16:28:53 -08:00
Mina Rizk
271b894af5
Map dict to TEXT
Thanks, @minaeid90
2021-11-14 16:27:40 -08:00