Statement

SQLite~ Statement

This class represents a single prepared statement.

Constructor

new Statement()

Source:

Members

expandedSQL

The source SQL text with parameter placeholders replaced.

Source:

sourceSQL

The source SQL text of the prepared statement.

Source:

Methods

all(…params) → {Array.<Object>}

Executes a prepared statement and returns all results.

Source:
Parameters:
Name Type Attributes Description
params * <repeatable>

Zero or more values to bind to positional parameters.

Returns:
Type:
Array.<Object>
  • An array of objects.

columns() → {Array.<Column>}

Returns information about the columns used by the prepared statement.

Source:
Returns:
Type:
Array.<Column>

get(…params) → {Object|undefined}

Returns the first result.

Source:
Parameters:
Name Type Attributes Description
params * <repeatable>

Zero or more values to bind to positional parameters.

Returns:
Type:
Object | undefined
  • An object corresponding to the first row.

run(…params) → {Changes}

Executes a prepared statement and returns the resulting changes.

Source:
Parameters:
Name Type Attributes Description
params * <repeatable>

Zero or more values to bind to positional parameters.

Returns:
Type:
Changes

setReadBigInts(enable)

Enables or disables the use of BigInts when reading INTEGER fields.

Source:
Parameters:
Name Type Default Description
enable boolean false

Flag to enable or disable BigInts.