mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
memory_name= feature, closes #405
This commit is contained in:
parent
8f528ed2b1
commit
4bc06a2437
3 changed files with 25 additions and 3 deletions
|
|
@ -98,6 +98,12 @@ If you want to create an in-memory database, you can do so like this:
|
|||
|
||||
db = Database(memory=True)
|
||||
|
||||
You can also create a named in-memory database. Unlike regular memory databases these can be accessed by multiple threads, provided at least one reference to the database still exists. `del db` will clear the database from memory.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
db = Database(memory_name="my_shared_database")
|
||||
|
||||
Connections use ``PRAGMA recursive_triggers=on`` by default. If you don't want to use `recursive triggers <https://www.sqlite.org/pragma.html#pragma_recursive_triggers>`__ you can turn them off using:
|
||||
|
||||
.. code-block:: python
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue