Skip to main content

db_connector

Helper class to connect to local SQLite database.

Classes

DbConnector

class DbConnector(pod_db_path: Optional[pathlib.Path] = None):

Database connector to local SQLite database.

Arguments

  • pod_db_path: Optional path to the directory where the SQLite database files are stored. Defaults to None.

Variables

PodDbConnector

class PodDbConnector(pod_db_path: Optional[pathlib.Path] = None):

Database connector to local pod SQLite database.

Arguments

  • pod_db_path: Optional path to the directory where the SQLite database files for the pod are stored. Defaults to None.

Ancestors

Variables

Methods


get_db_connection_from_identifier

def get_db_connection_from_identifier(self, pod_identifier: str)> sqlite3.Connection:

Establishes a connection to the database given a pod id.

Returns Connection: The connection to the SQLite DB.

get_db_connection_from_name

def get_db_connection_from_name(self, pod_name: str)> sqlite3.Connection:

Establishes a connection to the database given a pod name.

Returns Connection: The connection to the SQLite DB.

ProjectDbConnector

class ProjectDbConnector(pod_db_path: Optional[pathlib.Path] = None):

Database connector to local project SQLite database.

Arguments

  • pod_db_path: Optional path to the directory where the SQLite database files for the project are stored. Defaults to None.

Ancestors

Variables

Methods


get_project_db_connection

def get_project_db_connection(self, project_id: str)> sqlite3.Connection:

Establishes a connection to the database given a project id.

Returns Connection: The connection to the SQLite DB.