Simon Willison
5b257949d9
table.use_rowid introspection property, closes #285
2021-06-19 08:12:29 -07:00
Simon Willison
0d2e4f49f3
db.schema and 'sqlite-utils schema' command, closes #268
2021-06-11 13:51:49 -07:00
Simon Willison
9c67cb9252
table.xindexes property plus improved introspection documentation, closes #261
2021-06-02 20:51:27 -07:00
Simon Willison
b4f09146d3
table.has_counts_triggers property, refs #219
2021-01-03 12:41:24 -08:00
Simon Willison
de08096989
database.triggers_dict, closes #216
2021-01-02 20:19:55 -08:00
Simon Willison
b067f1ff57
table.triggers_dict property, closes #211
2021-01-01 18:10:04 -08:00
Simon Willison
59d8689ed0
table.virtual_table_using property, closes #196
2020-11-04 19:53:45 -08:00
Simon Willison
cf2cb244fa
Tracer mechanism for showing underlying SQL queries
...
* Pass a tracer= function to Database constructor
* New db.tracer() contextmanager
* Neater SQL indentation, because tracer means it could be visible now
* New db.execute() and db.executescript() methods
Closes #150
2020-09-07 14:56:59 -07:00
Simon Willison
fc38868bd4
Refactored tests into new test_rows.py, refs #76
2020-04-15 18:04:55 -07:00
Simon Willison
2ca63e3b2d
db.triggers and table.triggers introspection ( #60 )
...
Closes #59
2019-09-02 17:09:41 -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
e4a11b1815
Refactor .update() to use .get()
...
.pks introspection now returns [rowid] for rowid tables.
2019-07-28 15:44:33 +03:00
Simon Willison
58db40d67c
Better __repr__ for tables
2019-07-22 17:05:51 -07:00
Simon Willison
d645032cfa
add_foreign_key can now detect table and pk, refs #25
2019-06-12 21:51:09 -07:00
Simon Willison
3095f2e671
Added db[table].rows iterator
2019-02-21 21:29:50 -08:00
Simon Willison
0a8194e730
sqlite-utils optimize command, .optimize() and .detect_fts() table methods
2019-01-24 20:35:51 -08:00
Simon Willison
015bd2a840
Test for .table_names(fts5=True)
2019-01-24 20:23:53 -08:00
Simon Willison
66fd63b119
Ability to list just FTS4 or FTS5 table names
2019-01-24 19:57:04 -08:00
Simon Willison
fcc38b9ff2
Moved fixtures into conftest.py
2018-08-12 17:25:39 -07:00
Simon Willison
c611ed80d2
.indexes property for introspecting indexes
2018-07-31 18:31:29 -07:00
Simon Willison
515d362ad6
.table_names and .tables properties plus expanded docs
2018-07-31 17:35:36 -07:00
Simon Willison
c446e22f34
Moved fixtures to fixtures.py, added .schema test
2018-07-31 08:55:24 -07:00
Simon Willison
5deb65f062
Now you just 'from sqlite_utils import Database'
...
Plus fixed ad_id in the Russian ads example in the docs
2018-07-30 20:30:23 -07:00
Simon Willison
b69f8b6c85
table.count property, plus made a start on table documentation
2018-07-30 20:24:35 -07:00