Skip to content
Back to top
View this page

# DatabaseSQLite

class dsviper.DatabaseSQLite

  Bases: `object`

  A low-level class used to represent a CRUD like database based on SQLite3 through the Databasing interface. Use the high-level static factory method Database.create_in_memory(), Database.create(…) or Database.open(…).

  Note: Not directly instantiable.

  close()

    Close the database.

  static create(file_path: str, *, documentation: str | None = None) → DatabaseSQLite

    Create and return a database.

  static create_in_memory() → DatabaseSQLite

    Create and return a database in memory.

  databasing() → Databasing

    Return the Databasing interface.

  is_closed() → bool

    Return True if the database is closed.

  static is_compatible(file_path: str) → bool

    Return True the SQL schema contains required tables.

  static open(file_path: str, readonly: bool = False) → DatabaseSQLite

    Open and return a database.

  sqlite() → SQLite

    Return the sqlite api.