SQLite¶
- class dsviper.SQLite¶
Bases:
objectThe settings and limits of one database file and of its SQLite3 build.
The pragmas, page size and maximum size belong to the file; the compile options and max_length() to the library it runs on, the same for every file.
Note: Not directly instantiable.
- compile_options() dict[str, str]¶
Return the SQLite compile-time options, as a dict[str, str].
An option set without a value, such as a feature flag, maps to ‘on’.
- get_pragma(key: str) list[str]¶
Return the value of the SQLite pragma key, as a list of str.
- static is_sqlite3(file_path: str) bool¶
Return True if the file at file_path is a SQLite3 database.
- max_database_size() int¶
Return the largest the database file may grow to, in bytes: page_size() times max_page_count().
- max_length() int¶
Return the largest string or blob this SQLite3 build will handle, in bytes.
- max_page_count() int¶
Return how many pages the database file may grow to.
- page_size() int¶
Return the size of a database page in bytes.
- pragmas() list[str]¶
Return the list of pragmas.
- set_pragma(key: str, value: str) None¶
Set the SQLite pragma key to value.