Commit graph

186 commits

Author SHA1 Message Date
Simon Willison
015c663464 Fixed lint errors, refs #454 2022-07-15 14:59:06 -07:00
Simon Willison
c710ade644 sqlite-utils duplicate command, closes #454, refs #449
Also made it so .duplicate() raises new NoTable exception rather than raising
an AssertionError if the source table does not exist.
2022-07-15 14:45:47 -07:00
Simon Willison
0cee77b176 Update test for renamed restkey, refs #440, #443 2022-06-14 14:14:20 -07:00
Simon Willison
93fa79d30b Ignore flake8 lambda errors, refs #415 2022-03-20 21:22:09 -07:00
Simon Willison
751ab205ac Fix for --multi combined with --dry-run, closes #415 2022-03-20 21:18:18 -07:00
Simon Willison
878d5f5cea errors=r.SET_NULL/r.IGNORE options for parsedate/parsedatetime, closes #416 2022-03-20 21:01:35 -07:00
Chris Amico
a692c56659
Add SpatiaLite helpers to CLI (#407)
* Add SpatiaLite CLI helpers
* Add docs for spaitalite helpers
* Fix flake8 issues and add more detail on spatial types
* Run cog and add some help text.
* Use SpatiaLite when calculating coverage, refs #407

Co-authored-by: Simon Willison <swillison@gmail.com>
2022-02-15 16:58:07 -08:00
Simon Willison
e7f040106b Add an example of --text too, refs #404 2022-02-08 23:03:04 -08:00
Simon Willison
7142dbd58d Fixed typo in --help 2022-02-08 22:57:21 -08:00
Simon Willison
79a5ece62e Add --convert example to sqlite-utils insert --help, closes #404 2022-02-08 22:55:01 -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
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
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
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
12b8c9de25 sqlite-utils memory --flatten, closes #332 2021-11-14 15:05:00 -08:00
Simon Willison
c1b26eed03 sqlite-utils memory handles files with same filename, closes #325 2021-09-22 13:45:37 -07:00
Simon Willison
7427a9137f Output [] in JSON mode if no rows, closes #328 2021-09-22 13:20:04 -07:00
Simon Willison
49a010c93d
Ability to insert file contents as text, in addition to blob (#321) 2021-08-24 16:31:13 -07:00
Simon Willison
9258f4bd84 sqlite-utils memory --analyze, closes #320 2021-08-22 08:44:25 -07:00
Simon Willison
7e2dcbbbea Fixed bug with --no-headers --tsv, closes #295 2021-08-18 13:18:54 -07:00
Simon Willison
ccf128cd6d sqlite-utils search --quote option, closes #296 2021-08-18 13:10:44 -07:00
Simon Willison
a6567ec507 Capture parameters= not params=, refs #309 2021-08-09 15:33:33 -07:00
Simon Willison
14f643d9e9 Better error messages in CLI, closes #309 2021-08-09 15:25:52 -07:00
Simon Willison
15758d02fd Fixed spelling of objects, refs #310 2021-08-09 14:45:39 -07:00
Simon Willison
f67327abf0 sqlite-utils insert --flatten option, closes #310 2021-08-09 14:44:03 -07:00