Commit graph

241 commits

Author SHA1 Message Date
Simon Willison
b2e0cd066d Test and docs for timedelta support, refs #522 2023-11-03 17:56:34 -07:00
Simon Willison
622c3a5a7d Fixed Markdown that should be rST 2023-09-08 18:25:46 -07:00
Simon Willison
5d123f031f
Fixed bug in replacing foreign key constraints example 2023-09-06 15:33:06 -07:00
Simon Willison
98cd11a81b
Link docs to sqlite-utils-fast-fks 2023-08-18 10:45:12 -07:00
Simon Willison
509857ee87
.add_foreign_keys() uses .transform() instead of PRAGMA writable_schema
Closes #577

This should solve all sorts of problems seen by users of platforms that throw errors on writable_schema.

Also added `add_foreign_keys=` and `foreign_keys=` parameters to `table.transform()`.
2023-08-17 17:48:08 -07:00
Simon Willison
1dc6b5aa64 Note about execute_plugins=False, refs #575 2023-08-07 11:47:34 -07:00
Simon Willison
61aaa69815 .transform(..., keep_table=name) parameter, closes #571
Also type hints for the transform_sql() method
2023-07-22 15:32:09 -07:00
Simon Willison
2c12c01346 Caling .transform() also reformats the schema, closes #564 2023-07-22 15:15:30 -07:00
Simon Willison
82e8cd3667 db.rename_table() method, refs #565 2023-07-22 12:38:31 -07:00
Simon Willison
80b5fa7f12 Documentation for replace=True/ignore=True, refs #568 2023-07-22 12:19:01 -07:00
Simon Willison
f5c63088e1
Use sqlean if available in environment (#560)
Closes #559
Closes #235

Refs https://github.com/simonw/llm/issues/60

- Uses `sqlean` in place of `sqlite3` if `sqlean.py` is installed
- Uses `sqlite-dump` if available and `conn.iterdump()` does not exist
- New `with db.ensure_autocommit_off()` method for ensuring autocommit is off, used by `enable_wal()` and `disable_wal()`.
2023-06-25 16:25:51 -07:00
Simon Willison
d2a7b15b2b
Analyze tables options: --common-limit, --no-most, --no-least
Closes #544
2023-05-21 09:19:30 -07:00
Simon Willison
e0ec4c3451 --no-skip-false option, plus docs - closes #527 2023-05-08 14:03:20 -07:00
Simon Willison
365f62520f will, not may - refs #468 2022-08-27 20:38:30 -07:00
Simon Willison
104f37fa4d
db[table].create(..., transform=True) and create-table --transform
Closes #467
2022-08-27 16:17:55 -07:00
Simon Willison
36ffcafb1a table.default_values property, closes #475
Refs #468
2022-08-27 15:42:58 -07:00
Simon Willison
1491b66dd7 register_function(name=...) argument, closes #458 2022-07-27 17:13:49 -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
da030d49fd Documentation for .duplicate(), refs #449 2022-07-15 14:29:52 -07:00
Simon Willison
773f2b6b20 Documented TypeTracker, closes #445 2022-06-20 12:46:49 -07:00
Simon Willison
1b09538bc6 where= and where_args= parameters to search() and search_sql()
Closes #441
2022-06-14 14:54:35 -07:00
Simon Willison
0b6aba696d Documentation for maximize_csv_field_size_limit, closes #442 2022-06-14 14:31:45 -07:00
Simon Willison
ce670e2d44 Docs for rows_from_file
Closes #440, closes #443
2022-06-14 13:12:42 -07:00
Simon Willison
397183debd Switch docs theme to Furo, refs #435 2022-05-20 14:52:00 -07:00
Simon Willison
7f56f90d30
Fixed rST mistake 2022-03-01 23:01:07 -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
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
Simon Willison
fea8c9bcc5 Improved SpatiaLite example, closes #401 2022-02-05 18:03:21 -08:00
Simon Willison
aa24903113 Create table if_not_exists=True argument, closes #397 2022-02-05 17:28:53 -08:00
Simon Willison
44894c6f6c Fix warning about duplicate object description 2022-02-03 22:31:13 -08:00
Simon Willison
cea25c28ba Capitalization of SpatiaLite 2022-02-03 21:59:59 -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
813b6d07ab Much improved insert-replace documentation, refs #393 2022-02-03 14:11:38 -08:00
Simon Willison
a6da26a856
Simplified example 2022-01-30 07:24:13 -08:00
Simon Willison
feb01c1ddd
Fixed duplicated example 2022-01-30 07:22:39 -08:00
Simon Willison
6663d28952
SQL injection, not XSS 2022-01-30 07:17:20 -08:00
Simon Willison
b3efb29212 SQLite can drop columns now
It gained that ability in 3.35.0 in 2021-03-12:
https://www.sqlite.org/changes.html#version_3_35_0
2022-01-25 17:48:57 -08:00
Simon Willison
8d51ae48ab Getting started section for Python library, closes #387 2022-01-25 17:35:26 -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
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
54a2269e91 Optional second argument to .lookup() to populate extra columns, closes #339 2021-11-14 18:01:56 -08:00
Simon Willison
e8d958109e create_index(..., find_unique_name=True) option, refs #335 2021-11-14 14:49:42 -08:00
Simon Willison
8ae77a6961 table.search(quote=True) parameter, refs #296 2021-08-18 12:55:53 -07:00
Simon Willison
1fa5a12a49 Documentation for db.quote_fts(), refs #246 2021-08-18 11:55:50 -07:00