Commit graph

43 commits

Author SHA1 Message Date
Chris Amico
8f9a729e8a
Add paths for homebrew on Apple silicon (#536) 2023-04-12 18:44:43 -07:00
Simon Willison
7ca497a8f5 repr improvements, refs #503 2022-10-25 13:14:41 -07:00
Simon Willison
34e75ed0dd sqlite_utils.utils.flatten() function, closes #500 2022-10-18 11:00:35 -07:00
Mischa Untaga
0b315d3fa8
progressbar for inserts/upserts of other file formats
* progressbar for inserts/upserts of other file formats, closes #485
* Pin to Python 3.10.6 for the moment as workaround for mypy error

Co-authored-by: Simon Willison <swillison@gmail.com>
2022-09-15 13:37:51 -07:00
Simon Willison
a46a5e3a9e Improved code compilation pattern, closes #472 2022-08-26 22:20:09 -07:00
Simon Willison
e10536c7f5 utils.chunks() is now a documented API, closes #451 2022-07-15 14:59:30 -07:00
Simon Willison
8a9fe6498f Applied Black, refs #445 2022-06-20 12:50:15 -07:00
Simon Willison
773f2b6b20 Documented TypeTracker, closes #445 2022-06-20 12:46:49 -07:00
Simon Willison
0cee77b176 Update test for renamed restkey, refs #440, #443 2022-06-14 14:14:20 -07:00
Simon Willison
ce670e2d44 Docs for rows_from_file
Closes #440, closes #443
2022-06-14 13:12:42 -07:00
Simon Willison
f142bb1212
flake8 fix, refs #440 2022-06-14 09:14:57 -07:00
Simon Willison
d9c715a2fc One more typing fix, refs #440 2022-06-14 09:07:57 -07:00
Simon Willison
19efee2746 mypy fixes, refs #440 2022-06-14 08:39:08 -07:00
Simon Willison
d379f430f8 rows_from_file(... ignore_extras: bool, restkey: str), refs #440 2022-06-14 08:14:02 -07:00
Simon Willison
26e6d2622c Use :param x: for docstring comments, refs #413 2022-03-11 09:39:17 -08:00
Simon Willison
931b1e1513 .insert(hash_id_columns=) parameter, closes #343 2022-03-01 16:00:51 -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
22c8d10dd3 --convert function can now modify row in place, closes #371 2022-01-09 12:06:02 -08:00
Simon Willison
a8f9cc6f64 Add test for chunks(), refs #364 2022-01-08 13:16:52 -08:00
Simon Willison
2e4847e493 Implemented --convert for different things, renamed --all to --text 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
60dea99ef7 --silent option for sqlite-utils insert-files, closes #301 2021-08-02 12:12:16 -07:00
Simon Willison
5ec6686153
sqlite-utils convert command and db[table].convert(...) method
Closes #251, closes #302.
2021-08-01 21:47:39 -07:00
Simon Willison
7b3fdf0fcd mypy annotations for rows_from_file(), run mypy in CI
Refs #289, #279
2021-06-22 11:04:32 -07:00
Simon Willison
dc94f4bb8c Don't detect types on JSON input to memory, closes #283 2021-06-19 07:52:44 -07:00
Simon Willison
ec5174ed40 Detect types for sqlite-utils memory CSV, opt out with --no-detect-types - closes #282 2021-06-18 21:37:56 -07:00
Simon Willison
fd9867d145 sqlite-utils insert --detect-types option, refs #282 2021-06-18 21:18:58 -07:00
Simon Willison
00e4bd5ff1 TSV and JSON support for sqlite-utils memory
Closes #281, closes #279, refs #272
2021-06-18 20:11:54 -07:00
Simon Willison
1e9eb875a6 Switch from codecs.getreader to io.TextIOWrapper, refs #230 2021-02-14 10:33:26 -08:00
Simon Willison
f99a236529
Progress bar for sqlite-utils insert command, closes #173 2020-10-27 11:16:02 -07:00
Simon Willison
bf4c6b7c82 find_spatialite() utility function, closes #135 2020-08-21 13:30:02 -07:00
Simon Willison
1a61a6d3d6 Ability to insert base64 binary data as JSON, closes #126 2020-07-26 20:59:34 -07:00
Simon Willison
b436bdb594 Fixed bug with null columns, closes #95 2020-03-23 13:31:06 -07:00
Simon Willison
1c745df923 Suggest column types ignores nulls, closes #94 2020-03-23 12:57:02 -07:00
Simon Willison
1125460497 Improved column type introspection, closes #92 2020-03-14 13:04:06 -07:00
Simon Willison
685e6a1bb3 Detect subclasses of dict/tuple/list, fixes #87 2020-02-15 18:20:39 -08:00
Simon Willison
5ecf3ffdea Extracted detect_column_types as suggest_column_types, refs #81 2020-02-01 13:38:51 -08:00
Simon Willison
4ab8d46b03 Added table.update(pk, ..., alter=True) 2019-07-28 17:51:49 +03:00
Simon Willison
152eb2afaf Use pysqlite3 if available 2019-07-22 15:39:35 -07:00
Simon Willison
3f2e711a4b Refactored to use itertools
Found an itertools mechanism that works for iterating
through the current and next row in the cursor.
2019-01-26 10:59:01 -08:00
Simon Willison
5466c9745d sqlite-utils json dogs.db "select * from dogs" 2019-01-25 18:06:29 -08:00