sage.database.sqlite_backends package

Subpackages

Submodules

sage.database.sqlite_backends.connector module

class sage.database.sqlite_backends.connector.SQliteConnector(table_name: str, database: str, fetch_size: int = 500)

Bases: sage.database.db_connector.DatabaseConnector

A SQliteConnector search for RDF triples in a SQlite database. Constructor arguments:

  • table_name str: Name of the SQL table containing RDF data.

  • database str: the name of the sqlite database file.

  • fetch_size int: how many RDF triples are fetched per SQL query (default to 500)

abort_transaction()

Abort any ongoing transaction

close()

Close the database connection

commit_transaction()

Commit any ongoing transaction

open()

Open the database connection

start_transaction()

Start a PostgreSQL transaction

sage.database.sqlite_backends.transaction_manager module

class sage.database.sqlite_backends.transaction_manager.TransactionManager(database)

Bases: object

A TransactionManager handles transactions for a (MVCC-)PostgreSQL connector

abort()

Abort an ongoing transaction

close_all()

Close all connections & rollback any ongoing transactions

close_connection()

Close the connection for a given processs

commit()

Commit an ongoing transaction

get_connection()

Get the connection of a given processs

is_open()

Returns True if the current process has an open connection to the DB

open_connection()

Open a new connection for a given process

start_transaction()

Starts a new transaction

Module contents