Skip to content

Row

[Source]

Immutable snapshot of one fetched row. Safe to hold across fetches, safe to send across actors.

Typed accessors raise error on both out-of-range index AND type mismatch.

class val Row

Constructors

create

[Source]

new val create(
  columns: Array[SqlValue val] iso)
: Row val^

Parameters

Returns


Public Functions

column

[Source]

Polymorphic access. Raises error on out-of-range index.

fun box column(
  i: ColIndex val)
: SqlValue val ?

Parameters

Returns


int

[Source]

Read column as I64. Accepts any integer type, widening to I64. Raises error on type mismatch or out of range.

fun box int(
  i: ColIndex val)
: (I64 val | SqlNull val) ?

Parameters

Returns


float

[Source]

Read column as F64. Raises error on type mismatch or out of range.

fun box float(
  i: ColIndex val)
: (F64 val | SqlNull val) ?

Parameters

Returns


text

[Source]

Read column as String val. Raises error on type mismatch or out of range.

fun box text(
  i: ColIndex val)
: (String val | SqlNull val) ?

Parameters

Returns


bool

[Source]

Read column as Bool. Raises error on type mismatch or out of range.

Accepts SqlBool, any integer type (0=false, nonzero=true), and SqlText ("1"/"0"/"t"/"f"/"true"/"false") to handle drivers that report boolean columns as SMALLINT or CHAR (e.g., psqlODBC with BoolsAsChar=Yes).

fun box bool(
  i: ColIndex val)
: (Bool val | SqlNull val) ?

Parameters

Returns


date

[Source]

Read column as SqlDate. Raises error on type mismatch or out of range.

fun box date(
  i: ColIndex val)
: (SqlDate val | SqlNull val) ?

Parameters

Returns


time

[Source]

Read column as SqlTime. Raises error on type mismatch or out of range.

fun box time(
  i: ColIndex val)
: (SqlTime val | SqlNull val) ?

Parameters

Returns


timestamp

[Source]

Read column as SqlTimestamp. Raises error on type mismatch or out of range.

fun box timestamp(
  i: ColIndex val)
: (SqlTimestamp val | SqlNull val) ?

Parameters

Returns


decimal

[Source]

Read column as SqlDecimal. Raises error on type mismatch or out of range.

fun box decimal(
  i: ColIndex val)
: (SqlDecimal val | SqlNull val) ?

Parameters

Returns


is_null

[Source]

True if column value is SQL NULL. Raises error on out of range.

fun box is_null(
  i: ColIndex val)
: Bool val ?

Parameters

Returns


size

[Source]

Number of columns in the row.

fun box size()
: USize val

Returns