Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Statement

An SQLite prepared statement.

The methods of this class are used to bind some (possibly zero) parameters to the prepared statement and then execute the statement.

This class cannot be instantiated directly.

see

SqlValue

Hierarchy

  • Statement

Index

Properties

Methods

Properties

sql

sql: string

The original SQL used to prepare this statement, including placeholders.

If the statement has been closed then a dummy string whose value should not be relied upon is returned.

This property is primarily provided for diagnostic purposes.

Methods

all

  • Execute a statement, returning an array of multiple (possibly zero) rows.

    Parameters

    Returns ResultRow[]

close

  • close(): undefined
  • Close prepared statement. Calling any methods on a closed statement will result in an error, with the exception of further calls to close() which will have no effect.

    Returns undefined

one

  • Execute a statement, returning a single row or undefined.

    Parameters

    Returns ResultRow | undefined

run

  • Execute a statement, returning status information.

    Parameters

    Returns RunResult

Generated using TypeDoc