A database connection handler easying sharing the DB between C++ and Python. More...
Public Member Functions | |
def | __init__ (self, str path="file::memory:?cache=shared") |
Open the connection for the C++ application, with shared cache to ease access from Python to the same tables. More... | |
def | path (self) |
def | seed (self, int seed) |
Define the seed for the random number generated from Transformers interacting with the database through this connection. More... | |
def | connect (self) |
Python-like connection with a context-manager. More... | |
A database connection handler easying sharing the DB between C++ and Python.
Definition at line 24 of file db_functions.py.
def SQLamarr.db_functions.SQLite3DB.__init__ | ( | self, | |
str | path = "file::memory:?cache=shared" |
||
) |
Open the connection for the C++ application, with shared cache to ease access from Python to the same tables.
path | path-like or URI identifying the target resource; by default, an non-threadsafe connection to an in-memory database is opened. |
Connecting to an existing, prepared database stored on file mydata.db
Connecting to an empty, in-memory database for prototyping
Connecting to an empty, in-memory database in a multithreaded application with each thread working on its own db.
Definition at line 29 of file db_functions.py.
def SQLamarr.db_functions.SQLite3DB.connect | ( | self | ) |
Python-like connection with a context-manager.
Example.
Definition at line 85 of file db_functions.py.
def SQLamarr.db_functions.SQLite3DB.path | ( | self | ) |
Definition at line 65 of file db_functions.py.
def SQLamarr.db_functions.SQLite3DB.seed | ( | self, | |
int | seed | ||
) |
Define the seed for the random number generated from Transformers interacting with the database through this connection.
seed | integer seed for randomization |
Definition at line 72 of file db_functions.py.