Mrun
Bun

method

sqlite.StatementSync.run

...anonymousParameters: SQLInputValue[]

This method executes a prepared statement and returns an object summarizing the resulting changes. The prepared statement parameters are bound using the values in namedParameters and anonymousParameters.

@param anonymousParameters

Zero or more values to bind to anonymous parameters.

namedParameters: Record<string, SQLInputValue>,
...anonymousParameters: SQLInputValue[]

This method executes a prepared statement and returns an object summarizing the resulting changes. The prepared statement parameters are bound using the values in namedParameters and anonymousParameters.

@param namedParameters

An optional object used to bind named parameters. The keys of this object are used to configure the mapping.

@param anonymousParameters

Zero or more values to bind to anonymous parameters.

Referenced types

type SQLInputValue = null | number | bigint | string | NodeJS.ArrayBufferView

interface StatementResultingChanges

  • changes: number | bigint

    The number of rows modified, inserted, or deleted by the most recently completed INSERT, UPDATE, or DELETE statement. This field is either a number or a BigInt depending on the prepared statement's configuration. This property is the result of sqlite3_changes64().

  • lastInsertRowid: number | bigint

    The most recently inserted rowid. This field is either a number or a BigInt depending on the prepared statement's configuration. This property is the result of sqlite3_last_insert_rowid().