bob.db.utils.SQLiteConnector

class bob.db.utils.SQLiteConnector(filename, readonly=False, lock=None)[source]

Bases: object

An object that handles the connection to SQLite databases.

Initializes the connector

Keyword arguments

filename
The name of the file containing the SQLite database
readonly
Should I try and open the database in read-only mode?
lock
Any vfs name as output by apsw.vfsnames()
__init__(filename, readonly=False, lock=None)[source]

Initializes the connector

Keyword arguments

filename
The name of the file containing the SQLite database
readonly
Should I try and open the database in read-only mode?
lock
Any vfs name as output by apsw.vfsnames()

Methods

__init__(filename[, readonly, lock]) Initializes the connector
create_engine([echo]) Returns an SQLAlchemy engine
filesystem_is_lockable(database) Checks if the filesystem is lockable
session([echo]) Returns an SQLAlchemy session

Attributes

APSW_IS_AVAILABLE
static filesystem_is_lockable(database)[source]

Checks if the filesystem is lockable

APSW_IS_AVAILABLE = False
create_engine(echo=False)[source]

Returns an SQLAlchemy engine

session(echo=False)[source]

Returns an SQLAlchemy session