Skip to content
FutureBlitz

    Install

    Import std.db.database

    Statement

    std.db.database

    class

    Public Class Statement

    A statement prepared once, to run many times, its parameters bound to new values each time: what Database.Prepare makes. Its parameters are ?, ?NNN, :name, @name, and $name, numbered from 1 in order, as SQLite numbers them, and keep the values they're bound to until they're bound again, or Clear sets them to NULL. Closing its Database finalizes it, and using it after that panics, but for Parameters.

    std/db/database.fb, line 919

    • Public Property Parameters: Int property #

      How many parameters it takes: the largest number one has.

    • @PanicsAtCaller Public Method Bind<A: SqlValue>(index: Int, value: A) Throws DatabaseError method #

      Binds the parameter at index, from 1, to value. Panics when it has none there.

    • @PanicsAtCaller Public Method Bind<A: SqlValue>(name: String, value: A) Throws DatabaseError method #

      Binds the parameter of name, like ":id", to value. Panics when it has none of that name.

    • @PanicsAtCaller Public Method Clear() method #

      Sets each parameter to NULL.

    • @PanicsAtCaller Public Method Execute() Throws DatabaseError method #

      Runs it, with its parameters as they're bound, and throws a DatabaseError when it fails.

    • @PanicsAtCaller Public Method Execute<A: SqlValue>(a: A) Throws DatabaseError method #

      Binds its parameters to values, in order, then runs it. Panics when it takes another number of them.

    • @PanicsAtCaller Public Method Execute<A, B>(a: A, b: B) Throws DatabaseError method #

      Binds its parameters to a through b, in order, then runs it. Panics when it takes another number of them.

    • @PanicsAtCaller Public Method Execute<A, B, C>(a: A, b: B, c: C) Throws DatabaseError method #

      Binds its parameters to a through c, in order, then runs it. Panics when it takes another number of them.

    • @PanicsAtCaller Public Method Execute<A, B, C, D>(a: A, b: B, c: C, d: D) Throws DatabaseError method #

      Binds its parameters to a through d, in order, then runs it. Panics when it takes another number of them.

    • @PanicsAtCaller Public Method Execute<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E) Throws DatabaseError method #

      Binds its parameters to a through e, in order, then runs it. Panics when it takes another number of them.

    • @PanicsAtCaller Public Method Execute<A, B, C, D, E, F>(a: A, b: B, c: C, d: D, e: E, f: F) Throws DatabaseError method #

      Binds its parameters to a through f, in order, then runs it. Panics when it takes another number of them.

    • @PanicsAtCaller Public Method Execute<A, B, C, D, E, F, G>(a: A, b: B, c: C, d: D, e: E, f: F, g: G) Throws DatabaseError method #

      Binds its parameters to a through g, in order, then runs it. Panics when it takes another number of them.

    • @PanicsAtCaller Public Method Execute<A, B, C, D, E, F, G, H>(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H) Throws DatabaseError method #

      Binds its parameters to a through h, in order, then runs it. Panics when it takes another number of them.

    • @PanicsAtCaller Public Method Rows(): Row[] Throws DatabaseError method #

      The rows it reads, with its parameters as they're bound.

    • @PanicsAtCaller Public Method Query<T>(): T[] Throws DatabaseError, ParseError method #

      The rows it reads, with its parameters as they're bound, each a T that Load<T> makes of an Object of its columns by their names, each an integer, a Double, text, bytes, or Null, so a T's Fields of numbers, Bools as 0 or 1, Strings, UInt8[]s, Enums by their names, and T?s take them, and a Field no column has takes its default, or else its zero. Throws a ParseError for a row that doesn't make a T, whose Path starts with the row's index, as "[2].Age" does.

    • @PanicsAtCaller Public Method Query<T, A: SqlValue>(a: A): T[] Throws DatabaseError, ParseError method #

      Binds its parameters to values, in order, as Execute does, then gives the rows it reads as Ts, as Query<T>() does.

    • @PanicsAtCaller Public Method Query<T, A, B>(a: A, b: B): T[] Throws DatabaseError, ParseError method #

      Binds its parameters to a through b, in order, then gives the rows it reads as Ts.

    • @PanicsAtCaller Public Method Query<T, A, B, C>(a: A, b: B, c: C): T[] Throws DatabaseError, ParseError method #

      Binds its parameters to a through c, in order, then gives the rows it reads as Ts.

    • @PanicsAtCaller Public Method Query<T, A, B, C, D>(a: A, b: B, c: C, d: D): T[] Throws DatabaseError, ParseError method #

      Binds its parameters to a through d, in order, then gives the rows it reads as Ts.

    • @PanicsAtCaller Public Method Query<T, A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): T[] Throws DatabaseError, ParseError method #

      Binds its parameters to a through e, in order, then gives the rows it reads as Ts.

    • @PanicsAtCaller Public Method Query<T, A, B, C, D, E, F>(a: A, b: B, c: C, d: D, e: E, f: F): T[] Throws DatabaseError, ParseError method #

      Binds its parameters to a through f, in order, then gives the rows it reads as Ts.

    • @PanicsAtCaller Public Method Query<T, A, B, C, D, E, F, G>(a: A, b: B, c: C, d: D, e: E, f: F, g: G): T[] Throws DatabaseError, ParseError method #

      Binds its parameters to a through g, in order, then gives the rows it reads as Ts.

    • @PanicsAtCaller Public Method Query<T, A, B, C, D, E, F, G, H>(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): T[] Throws DatabaseError, ParseError method #

      Binds its parameters to a through h, in order, then gives the rows it reads as Ts.

    • @PanicsAtCaller Public Method Rows<A: SqlValue>(a: A): Row[] Throws DatabaseError method #

      Binds its parameters to values, in order, as Execute does, then gives the rows it reads.

    • @PanicsAtCaller Public Method Rows<A, B>(a: A, b: B): Row[] Throws DatabaseError method #

      Binds its parameters to a through b, in order, then gives the rows it reads.

    • @PanicsAtCaller Public Method Rows<A, B, C>(a: A, b: B, c: C): Row[] Throws DatabaseError method #

      Binds its parameters to a through c, in order, then gives the rows it reads.

    • @PanicsAtCaller Public Method Rows<A, B, C, D>(a: A, b: B, c: C, d: D): Row[] Throws DatabaseError method #

      Binds its parameters to a through d, in order, then gives the rows it reads.

    • @PanicsAtCaller Public Method Rows<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): Row[] Throws DatabaseError method #

      Binds its parameters to a through e, in order, then gives the rows it reads.

    • @PanicsAtCaller Public Method Rows<A, B, C, D, E, F>(a: A, b: B, c: C, d: D, e: E, f: F): Row[] Throws DatabaseError method #

      Binds its parameters to a through f, in order, then gives the rows it reads.

    • @PanicsAtCaller Public Method Rows<A, B, C, D, E, F, G>(a: A, b: B, c: C, d: D, e: E, f: F, g: G): Row[] Throws DatabaseError method #

      Binds its parameters to a through g, in order, then gives the rows it reads.

    • @PanicsAtCaller Public Method Rows<A, B, C, D, E, F, G, H>(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): Row[] Throws DatabaseError method #

      Binds its parameters to a through h, in order, then gives the rows it reads.

    Report an issue with this page or with FutureBlitz on GitHub.