irradiapy.database module
This module contains the Database class.
- class irradiapy.database.Database(path)[source]
Bases:
ConnectionA SQLite database with utility methods.
Not intended to be used directly, instead use it to inherit other database classes.
- Parameters:
path (
Path) – Path to the SQLite database file.
- optimize()[source]
Optimize the SQLite database.
This method performs two operations to optimize the database: 1. Executes the “PRAGMA optimize” command to analyze and optimize the database. 2. Executes the “VACUUM” command to rebuild the database file, repacking it into a minimal amount of disk space.
- Return type:
- read_chunk(table, what='*', condition='', chunksize=10000)[source]
Reads table data from the database as a generator in chunks. It might be faster than
readfor huge tables.
- read_numpy(table, what, conditions='')[source]
Reads table data from the database as a NumPy structured array.