Skip to content

Commit

Permalink
test with auto vacuum
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Mar 19, 2024
1 parent 0ce408a commit 54a4234
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vdb/lib/db6.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ def ensure_schemas(db_conn_obj: apsw.Connection, index_conn_obj: apsw.Connection
"CREATE TABLE if not exists cve_data(cve_id TEXT NOT NULL, type TEXT NOT NULL, namespace TEXT, name TEXT NOT NULL, source_data BLOB NOT NULL, override_data BLOB, source_data_hash TEXT NOT NULL);")
db_conn_obj.pragma("synchronous", "OFF")
db_conn_obj.pragma("journal_mode", "MEMORY")
db_conn_obj.pragma("auto_vacuum", "FULL")
index_conn_obj.execute(
"CREATE TABLE if not exists cve_index(cve_id TEXT NOT NULL, type TEXT NOT NULL, namespace TEXT, name TEXT NOT NULL, vers TEXT NOT NULL);")
index_conn_obj.pragma("synchronous", "OFF")
index_conn_obj.pragma("journal_mode", "MEMORY")
index_conn_obj.pragma("auto_vacuum", "FULL")


def get(db_file: str = config.VDB_BIN_FILE, index_file: str = config.VDB_BIN_INDEX, read_only=False) -> (
Expand Down

0 comments on commit 54a4234

Please sign in to comment.