ducky/types

Type mappings between DuckDB and Gleam.

Types

A complete query result with column metadata.

pub type DataFrame {
  DataFrame(columns: List(String), rows: List(Row))
}

Constructors

  • DataFrame(columns: List(String), rows: List(Row))

A single row from a query result.

pub type Row {
  Row(values: List(Value))
}

Constructors

  • Row(values: List(Value))

A value from a DuckDB result set.

pub type Value {
  Null
  Boolean(Bool)
  TinyInt(Int)
  SmallInt(Int)
  Integer(Int)
  BigInt(Int)
  Float(Float)
  Double(Float)
  Text(String)
  Blob(BitArray)
  Timestamp(Int)
  Date(Int)
  Time(Int)
  Interval(Int)
  List(List(Value))
}

Constructors

  • Null
  • Boolean(Bool)
  • TinyInt(Int)
  • SmallInt(Int)
  • Integer(Int)
  • BigInt(Int)
  • Float(Float)
  • Double(Float)
  • Text(String)
  • Blob(BitArray)
  • Timestamp(Int)
  • Date(Int)
  • Time(Int)
  • Interval(Int)
  • List(List(Value))

Values

pub fn get(row: Row, index: Int) -> option.Option(Value)

Get a value from a row by column index.

Search Document