Interface D1Database.D1Statement

All Superinterfaces:
org.teavm.jso.JSObject
Enclosing interface:
D1Database

public static interface D1Database.D1Statement extends org.teavm.jso.JSObject
A prepared statement.

bind(Object...) returns a new statement rather than mutating this one, so a prepared statement is reusable across bindings.

Since:
1.0.0
  • Method Details

    • bind

      default D1Database.D1Statement bind(Object... values)
      Binds values to this statement's placeholders.
      Parameters:
      values - the values, one per ?
      Returns:
      a bound statement
    • all

      default D1Database.D1Result all()
      Returns every matching row.
      Returns:
      every matching row
    • first

      default TSObject first()
      Returns the first row, or null when the query matched nothing.
      Returns:
      the first row, or null when the query matched nothing
    • first

      default TSObject first(String column)
      Reads one column of the first row.
      Parameters:
      column - the column name
      Returns:
      the value, or null when the query matched nothing
    • run

      default D1Database.D1Result run()
      Returns the outcome of a statement whose rows are not wanted.
      Returns:
      the outcome of a statement whose rows are not wanted
    • allRows

      org.teavm.jso.core.JSPromise<D1Database.D1Result> allRows()
    • firstRow

      org.teavm.jso.core.JSPromise<TSObject> firstRow()
    • firstColumn

      org.teavm.jso.core.JSPromise<TSObject> firstColumn(String column)
    • runStatement

      org.teavm.jso.core.JSPromise<D1Database.D1Result> runStatement()