Name of the database table
Array of column definitions (excluding the auto-increment ID column)
Protectedm_Protectedm_Protectedm_Creates the table in the database if it doesn't exist
Creates a table with an auto-increment ID column plus all specified columns. All columns are marked as NOT NULL.
SQLite database connection
Promise resolving to true if successful, false otherwise
Deletes a single element from the table by its ID
The ID of the element to delete
SQLite database connection
Promise resolving to true if successful, false otherwise
Inserts a single element into the table
The element to insert (object with properties matching table columns)
SQLite database connection
Promise resolving to the inserted element's ID, or undefined if failed
Performs batch updates on multiple elements using a database transaction
Updates multiple elements efficiently using a single transaction. If any update fails, the entire transaction is rolled back.
Array of update objects containing ID and fields to update
SQLite database connection
Promise resolving to true if all updates successful, false otherwise
Searches for a single element by its ID
The ID of the element to find
SQLite database connection
Promise resolving to the found element or undefined if not found
Retrieves random elements from the table
Number of random elements to retrieve
SQLite database connection
Optionalcolumns: string[]Optional array of specific columns to select
Promise resolving to array of random elements or undefined if failed
Searches for elements matching specified criteria
Supports both simple equality (e.g., {name: "John"}) and WHERE IN clauses
(e.g., {name: ["John", "Jane"]}). Array values automatically generate IN clauses.
SQLite database connection
OptionalelementToSearch: Map<string, string | number | (string | number)[]>Optional map of column-value pairs. Values can be arrays for IN clauses
Promise resolving to matching element(s) or undefined if failed
ProtectedpreparePrepares WHERE clause from a Map, supporting both equality and IN clauses
Generates SQL WHERE conditions from a Map of column-value pairs. Supports:
Map of column names to values (can be single values or arrays)
Optionalseparator: stringSeparator between conditions (typically "AND" or "OR")
Tuple of [whereClause, parameters]
ProtectedverifyProtectedprepare
Creates a new TableManipulation instance