Simon Willison
03ee97d225
CLI now supports upsert/insert - closes #115
2020-06-12 10:40:53 -07:00
Simon Willison
af3f81b540
Store decimal.Decimal in DB as FLOAT, closes #110
2020-05-10 18:50:03 -07:00
Simon Willison
98019e92d0
Ran black, refs #111
2020-05-10 18:26:16 -07:00
Simon Willison
4e9cb739c7
drop-table and drop-view commands, closes #111
2020-05-10 17:44:21 -07:00
Simon Willison
d16097231c
Added sqlite-utils create-view command, closes #107
2020-05-03 08:36:29 -07:00
Simon Willison
9f6085b4e4
create-table --ignore and --replace, refs #27
2020-05-03 08:24:39 -07:00
Simon Willison
4d5916075d
create-table --not-null, --default, --fk, refs #27
2020-05-03 08:09:00 -07:00
Simon Willison
99a7906fd9
sqlite-utils create-table docs, plus doc unit test
...
Refs #27 . Closes #108
2020-05-02 21:13:49 -07:00
Simon Willison
36d256b047
Initial implementation of create-table command, refs #27
2020-05-02 20:55:40 -07:00
Simon Willison
5c1df4e306
replace=True and ignore=True parameters for create_view(), closes #106
2020-05-02 09:02:04 -07:00
Simon Willison
d56029549a
Serialize JSON with non-JSON values, closes #102
2020-05-01 13:45:39 -07:00
Simon Willison
344e9573ca
Added sqlite-utils views command, closes #105
2020-05-01 13:38:28 -07:00
Simon Willison
147b52622d
sqlite-utils tables ... --schema option, closes #104
2020-05-01 10:12:16 -07:00
Simon Willison
2ab62bcd54
New columns= parameter for over-riding column types, closes #100
2020-04-17 16:53:25 -07:00
Simon Willison
125c625fbc
.rows_where(..., order_by=) argument, closes #76
2020-04-15 20:12:55 -07:00
Simon Willison
fc38868bd4
Refactored tests into new test_rows.py, refs #76
2020-04-15 18:04:55 -07:00
Simon Willison
729a3e7869
Tests for Database(..., recreate=True), refs #97
2020-04-12 20:47:36 -07:00
Simon Willison
635c91475a
Only set last_pk on singular .insert()/.update(), refs #98
2020-04-12 20:22:49 -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
daf2a245aa
Unit tests covering column_affinity, refs #92
2020-03-14 13:05:07 -07:00
Simon Willison
0c36feb6ca
.enable_fts() now works with columns with spaces in them, closes #90
2020-03-01 22:10:43 -08:00
Simon Willison
04ec53c039
Validate column names in more places, refs #86
2020-02-26 20:55:17 -08:00
Simon Willison
f9473ace14
disable-fts and .disable_fts(), closes #88
2020-02-26 20:40:35 -08:00
Simon Willison
b0ca657f49
Disallow square braces in column names, closes #86
2020-02-26 20:16:02 -08:00
Simon Willison
685e6a1bb3
Detect subclasses of dict/tuple/list, fixes #87
2020-02-15 18:20:39 -08:00
Simon Willison
6f3cb2c106
create_index now works with columns with spaces, closes #85
2020-02-10 21:13:15 -08:00
Simon Willison
0eda638d81
table.exists() now a documented method, closes #83
2020-02-08 15:56:03 -08:00
Simon Willison
7c28a4d133
Fix for upsert(hash_id=) bug, closes #84
2020-02-06 23:17:06 -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
e8b2b7383b
New conversions= feature, closes #77
...
Pull request: #78
2020-01-30 16:24:30 -08:00
Simon Willison
489eda92bc
.upsert() and upsert_all() require pk=, closes #73
2020-01-05 09:20:11 -08:00
Simon Willison
f0f15d3dc8
Reformatted with black
2019-12-29 22:09:52 -08:00
Simon Willison
468d51314a
test_upsert_compound_primary_key
2019-12-29 21:31:03 -08:00
Simon Willison
84bcabd093
New upsert implementation, refs #66
2019-12-30 05:29:23 +00:00
Simon Willison
cfbc09967e
Ran black, plus added comments for next step
...
Refs #66
2019-12-30 05:29:23 +00:00
Simon Willison
607a2a9ff6
insert --replace and insert(..., replace=True)
...
Refs #66
2019-12-30 05:29:23 +00:00
Simon Willison
8dab9fd1cc
insert_all() / .upsert_all() work with empty list ( #64 )
...
Closes #52
2019-11-06 20:32:37 -08:00
Simon Willison
169ea455fc
Added table.delete_where(), closes #62
2019-11-04 08:18:06 -08:00
Simon Willison
19073d6d97
Added table.delete(pk) method, refs #62
2019-11-04 08:08:01 -08:00
Simon Willison
eb39c84a8f
Test and docs for using :memory: as a filename
2019-10-04 09:17:27 -07:00
Simon Willison
2ca63e3b2d
db.triggers and table.triggers introspection ( #60 )
...
Closes #59
2019-09-02 17:09:41 -07:00
Amjith Ramanujam
405e092d59
Option to add triggers when enabling FTS ( #57 )
...
--create-triggers CLI option and create_triggers=True in the Python library
* Add an option to create triggers for fts table.
* Add cli option for the create-update-trigger.
* Add tests for the create-update-trigger option.
* Change FTS table escaping to square brackets.
2019-09-02 16:42:28 -07:00
Simon Willison
9faa982226
Ability to introspect and run queries against views ( #55 )
...
* db.views_names() method and and db.views property
* Separate View and Table classes, both subclassing new Queryable class
* view.drop() method
* Updated documentation
2019-08-23 15:19:41 +03:00
Simon Willison
5516175ca6
Allow table objects to be passed to .m2m()
2019-08-04 05:09:17 +03:00
Simon Willison
d96a8f149e
Use existing m2m table if one exists
2019-08-03 21:16:51 +03:00
Simon Willison
b9256413d2
db.m2m_table_candidates(table, other_table)
2019-08-03 21:07:06 +03:00
Simon Willison
b6b92980c0
table.m2m(..., m2m_table=x) argument
2019-08-03 20:51:22 +03:00
Simon Willison
ba1211d445
Implemented .m2m(table, lookup=...)
2019-08-03 17:28:03 +03:00
Simon Willison
ff2348e71a
Added failing tests
2019-07-31 09:16:46 +03:00