mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 01:14:31 +02:00
How to create a Database instance
This commit is contained in:
parent
3091bec4f7
commit
af89c5f851
1 changed files with 7 additions and 0 deletions
|
|
@ -251,6 +251,13 @@ class Database:
|
|||
"""
|
||||
Wrapper for a SQLite database connection that adds a variety of useful utility methods.
|
||||
|
||||
To create an instance::
|
||||
|
||||
# create data.db file, or open existing:
|
||||
db = Database("data.db")
|
||||
# Create an in-memory database:
|
||||
dB = Database(memory=True)
|
||||
|
||||
- ``filename_or_conn`` - String path to a file, or a ``pathlib.Path`` object, or a
|
||||
``sqlite3`` connection
|
||||
- ``memory`` - set to ``True`` to create an in-memory database
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue