Protected
_Protected
_Protected
Prepares the columns for a CREATE statement
Protected
_Protected
Prepares any foreign key constraints based upon the field supplied
Protected
_Protected
_Protected
_Protected
_Protected
_Protected
beginProtected
This does nothing as the underlying instance handles this internally
Closes the database instance
Note: closing the db using this method will kill the instance for all references to the instance
Protected
commitProtected
This does nothing as the underlying instance handles this internally
Protected
connectionProtected
This is not required for this database type
Prepares and executes the creation of an index on the table specified
Prepares and executes the creation of a table including the relevant indexes and constraints
Escapes the value for SQL
Escapes the ID for sql
Retrieves the current PRAGMA setting
Lists the tables in the specified database
Optional
filename: stringPrepares and executes a query to that performs a multi-update statement which is based upon a multi-insert statement that performs an UPSERT which is a lot faster than a bunch of update statements
Adds the listener
function to the end of the listeners array for the event
named eventName
. No checks are made to see if the listener
has already
been added. Multiple calls passing the same combination of eventName
and
listener
will result in the listener
being added, and called, multiple times.
server.on('connection', (stream) => {
console.log('someone connected!');
});
Returns a reference to the EventEmitter
, so that calls can be chained.
By default, event listeners are invoked in the order they are added. The emitter.prependListener()
method can be used as an alternative to add the
event listener to the beginning of the listeners array.
import { EventEmitter } from 'node:events';
const myEE = new EventEmitter();
myEE.on('foo', () => console.log('a'));
myEE.prependListener('foo', () => console.log('b'));
myEE.emit('foo');
// Prints:
// b
// a
The callback function
Protected
rollbackProtected
This does nothing as the underlying instance handles this internally
Sets the given PRAGMA setting
Truncates the specified table(s)
Creates a new instance connected to the specified database using the same configuration options
Static
verboseSets the execution mode to verbose and produces long stack traces. There is no way to reset this. See the wiki page on debugging SQLite for more information.
Creates a new instance of the class