SQLiteDb Namespace

Enumeration

Name Description
SQLiteDb.DefaultTxnMode Default transaction mode for SQLiteDbs.

Interface

Name Description
SQLiteDb.OpenOrCreateParams parameters common to opening or creating a new SQLiteDb
SQLiteDb.OpenParams Parameters for opening an existing SQLiteDb
SQLiteDb.PageSize Size of a SQLiteDb page in bytes
SQLiteDb.VacuumDbArgs Arguments for SQLiteDb.vacuum
SQLiteDb.WithOpenDbArgs Arguments for SqliteDb.withOpenDb

Type alias

Name Description
SQLiteDb.CreateParams Parameters for creating a new SQLiteDb

Defined in

SQLiteDb Class

A SQLiteDb file

Implements

Methods

Name Description
constructor(): SQLiteDb    
abandonChanges(): void Abandon (cancel) the outermost transaction, discarding all changes since last save.  
closeDb(saveChanges?: boolean): void Close SQLiteDb.  
createDb(dbName: string): void Create a SQLiteDb  
createDb(dbName: string, container?: CloudSqlite.CloudContainer, params?: SQLiteDb.CreateParams): void   Beta  
dispose(): void alias for closeDb.  
executeSQL(sql: string): DbResult execute an SQL statement  
openDb(dbName: string, openMode: OpenMode | SQLiteDb.OpenParams): void Open a SQLiteDb.  
openDb(dbName: string, openMode: OpenMode | SQLiteDb.OpenParams, container?: CloudSqlite.CloudContainer): void   Beta  
saveChanges(): void Commit the outermost transaction, writing changes to the file.  
vacuum(args?: SQLiteDb.VacuumDbArgs): void vacuum this database  
withOpenDb<T>(args: SQLiteDb.WithOpenDbArgs, operation: () => T): T Open a database, perform an operation, then close the database.  
withPreparedSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T): T Use a prepared SQL statement, potentially from the statement cache.  
withSavePoint(savePointName: string, operation: () => void): void Perform an operation on this database within a savepoint.  
withSqliteStatement<T>(sql: string, callback: (stmt: SqliteStatement) => T): T Prepared and execute a callback on a SQL statement.  

Properties

Name Type Description
isOpen Accessor ReadOnly boolean Returns true if this SQLiteDb is open  
isReadonly Accessor ReadOnly boolean Returns true if this SQLiteDb is open readonly  

Defined in

Last Updated: 20 June, 2023