Skip to content

SqlRaw

[Source]

Escape hatch for SQL types this library doesn't natively map to a typed SqlValue. Carries the raw bytes the driver returned, the SQL type code it reported, and the indicator (byte length, or SQL_NULL_DATA if the cell was NULL but for some reason still surfaced as SqlRaw).

Read path: produced by _ColumnBindings for any column whose declared SQL type isn't recognized.

Write path: binds the bytes back as SQL_C_BINARY with the original sql_type_code. Faithful round-trip when the destination column accepts binary input for that SQL type; behavior when it doesn't is driver- specific.

class val SqlRaw is
  SqlValue val

Implements


Constructors

create

[Source]

new val create(
  sql_type_code': I16 val,
  bytes': Array[U8 val] val,
  indicator': I64 val)
: SqlRaw val^

Parameters

  • sql_type_code': I16 val
  • bytes': Array[U8 val] val
  • indicator': I64 val

Returns


Public fields

let sql_type_code: I16 val

[Source]


let bytes: Array[U8 val] val

[Source]


let indicator: I64 val

[Source]


Public Functions

string

[Source]

fun box string()
: String iso^

Returns


c_data_type

[Source]

fun box c_data_type()
: I16 val

Returns


sql_type

[Source]

fun box sql_type()
: I16 val

Returns


len_or_indptr

[Source]

fun box len_or_indptr()
: I64 val

Returns


bind_to_odbc

[Source]

fun box bind_to_odbc(
  hstmt: Pointer[None val] tag,
  param_num: U16 val,
  ind_ptr: Pointer[I64 val] tag)
: I16 val

Parameters

Returns