Wykres commitów

41 Commity (fb7e70d5e72a951efe4b29ad999d8915c032d021)

Autor SHA1 Wiadomość Data
Simon Willison fb7e70d5e7 Database(is_mutable=) now defaults to True, closes #1808
Refs https://github.com/simonw/datasette-upload-dbs/issues/6
2022-09-09 09:19:20 -07:00
Simon Willison 3508bf7875 --nolock mode to ignore locked files, closes #1744 2022-05-17 12:40:25 -07:00
Simon Willison 3f00a29141
Clean up compatibility with Pyodide (#1736)
* Optional uvicorn import for Pyodide, refs #1733
* --setting num_sql_threads 0 to disable threading, refs #1735
2022-05-02 13:15:27 -07:00
Simon Willison 7a6654a253 Databases can now have a .route separate from their .name, refs #1668 2022-03-19 17:11:17 -07:00
Simon Willison 14e320329f Hidden tables data_licenses, KNN, KNN2 for SpatiaLite, closes #1601 2022-01-19 20:38:49 -08:00
Simon Willison 58652dd925 Hidden tables sqlite1/2/3/4, closes #1587 2022-01-19 20:12:46 -08:00
Simon Willison 00a2895cd2 execute_write defaut is now block=True, closes #1579 2021-12-23 11:03:49 -08:00
Simon Willison f65817000f Include count in execute_write_many traces, closes #1571 2021-12-19 12:30:34 -08:00
Simon Willison 5cadc24489 db.execute_write_script() and db.execute_write_many(), closes #1570
Refs #1555
2021-12-18 10:57:22 -08:00
Simon Willison 2e4ba71b53 Optimize create table calls using executescript=True
Refs #1555, #1569
2021-12-18 10:34:15 -08:00
Simon Willison 9e094b7c9d db.execute_write(executescript=True) option, closes #1569 2021-12-18 10:34:15 -08:00
Simon Willison f81d9d0cd9 Trace write SQL queries in addition to read ones, closes #1568 2021-12-17 18:42:29 -08:00
Simon Willison 83bacfa945 Call _prepare_connection() on write connections, closes #1564 2021-12-17 17:58:39 -08:00
Simon Willison 737115ea14
Label column finder is now case-insensitive
Closes #1544
2021-12-07 12:03:42 -08:00
Simon Willison 48d5e0e6ac Fix for no such table: pragma_database_list, refs #1276 2021-03-28 16:44:29 -07:00
Simon Willison 6f41c8a2be
--crossdb option for joining across databases (#1232)
* Test for cross-database join, refs #283
* Warn if --crossdb used with more than 10 DBs, refs #283
* latest.datasette.io demo of --crossdb joins, refs #283
* Show attached databases on /_memory page, refs #283
* Documentation for cross-database queries, refs #283
2021-02-18 14:09:12 -08:00
Simon Willison 8919f99c2f Improved .add_database() method design
Closes #1155 - _internal now has a sensible name

Closes #509 - Support opening multiple databases with the same stem
2020-12-22 12:04:18 -08:00
Simon Willison 5e9895c67f Database(memory_name=) for shared in-memory databases, closes #1151 2020-12-17 17:01:18 -08:00
Simon Willison eae103a82b Write errors to stderr, closes #1131 2020-12-04 21:21:11 -08:00
Simon Willison c745c2715a Moved comment for clarity 2020-11-29 12:27:34 -08:00
Simon Willison 30e64c8d3b
Use f-strings in place of .format()
Code transformed like so:

    pip install flynt
    flynt .
    black .
2020-11-15 15:24:22 -08:00
Simon Willison 5a184a5d21 Display column type in column action menu, closes #993
Also added new documented db.table_column_details() introspection method.
2020-10-05 17:32:10 -07:00
Simon Willison b86f94883b
Don't hang in db.execute_write_fn() if connection fails
Closes #935

Refs https://github.com/simonw/latest-datasette-with-all-plugins/issues/3
2020-08-15 15:35:31 -07:00
Simon Willison 563f5a2d3a
Magic parameters for canned queries
Closes #842

Includes a new plugin hook, register_magic_parameters()
2020-06-27 19:58:16 -07:00
Simon Willison 124acf34a6 Removed db.get_outbound_foreign_keys method
It duplicated the functionality of db.foreign_keys_for_table.
2020-05-30 11:39:46 -07:00
Simon Willison 4d798ca0e3 Added test for db.mtime_ns 2020-05-30 11:17:20 -07:00
Simon Willison 012c76901a _ prefix for many private methods of Datasette, refs #576 2020-05-30 07:38:46 -07:00
Simon Willison 4433306c18
Improvements + docs for db.execute() and Results class
* Including new results.first() and results.single_value() methods. Closes #685
2020-05-08 09:05:46 -07:00
Simon Willison 69e3a855dd Rename execute_against_connection_in_thread() to execute_fn(), refs #685 2020-05-08 07:16:39 -07:00
Simon Willison b796519da2 Print exceptions if they occur in the write thread 2020-03-02 17:59:29 -08:00
Simon Willison a093c5f79f
.execute_write() and .execute_write_fn() methods on Database (#683)
Closes #682.
2020-02-24 20:45:07 -08:00
Simon Willison 6303ea5048 prepare_connection() now takes datasette and database args, refs #678 2020-02-21 17:32:40 -08:00
Simon Willison f1442a8151 Replaced self.ds.execute with db.execute in more places 2020-02-13 18:20:05 -08:00
Simon Willison 16665c9ee6 Better handling of corrupted database files 2019-12-22 15:31:40 +00:00
Simon Willison a9909c29cc Move .execute() from Datasette to Database
Refs #569 - I split this change out from #579
2019-11-15 14:52:03 -08:00
Simon Willison 28c4a6db5b CREATE INDEX statements on table page, closes #618 2019-11-09 17:29:36 -08:00
Simon Willison f04deebec4 Refactored connection logic to database.connect() 2019-07-26 13:22:57 +03:00
Simon Willison bd4dbc8519 Rename InterruptedError => QueryInterrupted, closes #490 2019-05-27 17:16:36 -07:00
Simon Willison edb36629e7 Database.get_outbound_foreign_keys() refactor
Following this, the only module that ever makes calls to the low-level
execute_against_connection_in_thread() method is datasette/database.py
2019-05-27 11:41:44 -07:00
Simon Willison 20f98c3e20 Databse.primary_keys(table) / fts_table(table) refactor, closes #488
Also cleaned up some unused imports spotted by the linter.
2019-05-27 11:27:42 -07:00
Simon Willison 6569287d90 Refactored ConnectedDatabase to datasette/database.py
Closes #487
2019-05-26 22:07:43 -07:00