Commit graph

379 commits

Author SHA1 Message Date
Simon Willison
d379f430f8 rows_from_file(... ignore_extras: bool, restkey: str), refs #440 2022-06-14 08:14:02 -07:00
Simon Willison
cbaad1f153 Removed unused sys import, refs #425 2022-04-13 15:40:57 -07:00
Simon Willison
0e60f3c80c Better error message if table has no columns, closes #424 2022-04-13 15:39:48 -07:00
Simon Willison
4433eafff7 Fix for register() on Python 3.7, refs #425 2022-04-13 15:35:57 -07:00
Simon Willison
6f3ae864f1 Better support check for deterministic=True, closes #425
Bug first discovered in #421
2022-04-13 15:31:37 -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
Simon Willison
433813612f Move sqls=[] closer to where it is populated 2022-03-11 13:44:07 -08:00
Simon Willison
6fd7c138e2 Fixed .transform() method which I broke in #413 2022-03-11 09:54:17 -08:00
Simon Willison
26e6d2622c Use :param x: for docstring comments, refs #413 2022-03-11 09:39:17 -08:00
Simon Willison
d25cdd37a3 db.sqlite_version property and fix for deterministic=True on SQLite 3.8.3
Closes #408
2022-03-01 16:37:53 -08:00
Simon Willison
521921b849 Fixed mypy error, refs #343 2022-03-01 16:05:11 -08:00
Simon Willison
931b1e1513 .insert(hash_id_columns=) parameter, closes #343 2022-03-01 16:00:51 -08:00
Simon Willison
4bc06a2437 memory_name= feature, closes #405 2022-02-15 17:23:11 -08: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
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