Database class
Home > @direct-sqlite/core > Database
Database class
Section titled “Database class”High-performance, zero-allocation abstraction layer for SQLite instances. Normalizes differences between better-sqlite3, node:sqlite and ‘bun:sqlite`.
Signature:
export declare class DatabaseConstructors
Section titled “Constructors”|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
Section titled “Properties”|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
GenericSqliteClient |
Methods
Section titled “Methods”|
Method |
Modifiers |
Description |
|---|---|---|
|
Hooks up custom metric calculations that aggregate state step-by-step across matching rows. | ||
|
Performs a non-blocking copy of the database to target path. | ||
|
Flushes tracked log buffers back into primary storage to shrink log file. | ||
|
Creates a table based on the provided configuration and returns a TableRunner for that table. | ||
|
Binds a custom JavaScript runtime algorithm which is directly executable in SQL queries. | ||
|
Resolves statements from cache or registers a fresh pointer with LRU cache eviction defenses active. | ||
|
Fine tunes the database engine for high-throughput scenarios. | ||
|
Initializes a TableRunner for an existing table in the database, allowing for fluent query building and execution. | ||
|
Executes a series of database operations within a transaction. If any operation throws an error, the transaction will be rolled back. |