pyworkflow.mapper.sqlite_db module

This module contains some sqlite basic tools to handle Databases.

class pyworkflow.mapper.sqlite_db.SqliteDb[source]

Bases: object

Class to handle a Sqlite database. It will create connection, execute queries and commands.

OPEN_CONNECTIONS = {}
close()[source]
classmethod closeConnection(dbName)[source]
getDbName()[source]
getTableColumns(tableName)[source]
getTables(tablePattern=None)[source]

Return the table names existing in the Database. If tablePattern is not None, only tables matching the pattern will be returned.

getVersion()[source]

Return the database ‘version’ that is used. Internally it make use of the SQLite PRAGMA database.user_version;

hasTable(tableName)[source]
setVersion(version)[source]