QuackDB decodes DuckDB Quack result vectors into Elixir values. The table below reflects the current package behavior and is intentionally conservative while both QuackDB and DuckDB's Quack protocol are experimental.

Scalar types

DuckDB typeElixir valueStatusNotes
BOOLEANboolean()Supported
TINYINTinteger()SupportedSigned 8-bit.
UTINYINTnon_neg_integer()SupportedUnsigned 8-bit.
SMALLINTinteger()SupportedSigned 16-bit.
USMALLINTnon_neg_integer()SupportedUnsigned 16-bit.
INTEGERinteger()SupportedSigned 32-bit.
UINTEGERnon_neg_integer()SupportedUnsigned 32-bit.
BIGINTinteger()SupportedSigned 64-bit.
UBIGINTnon_neg_integer()SupportedUnsigned 64-bit.
HUGEINTinteger()SupportedSigned 128-bit.
UHUGEINTnon_neg_integer()SupportedUnsigned 128-bit.
FLOATfloat()Supported32-bit floating point.
DOUBLEfloat()Supported64-bit floating point.
DECIMALDecimal.t()SupportedWidths backed by 16-, 32-, 64-, and 128-bit storage are covered.
VARCHAR / CHARString.t()SupportedInvalid UTF-8 raises a protocol error.
BLOBbinary()SupportedReturned as raw bytes.
UUIDUUID stringSupportedReturned in canonical lowercase UUID format.
ENUMString.t()SupportedReturned as the enum label.
BITString.t()SupportedReturned as a string of 0 and 1 characters.
BIGNUMinteger()SupportedDecodes DuckDB's variable-length integer payload into an Elixir integer.
GEOMETRYbinary()PartialDecoded as WKB-compatible bytes when DuckDB's spatial extension returns geometry values; semantic geometry structs are not implemented.

Temporal types

DuckDB typeElixir valueStatusNotes
DATEDate.t()Supported
TIMETime.t()SupportedMicrosecond precision.
TIME_NSQuackDB.NanosecondTime.t()SupportedPreserves nanoseconds since midnight.
TIMESTAMP_SNaiveDateTime.t()SupportedSecond precision.
TIMESTAMP_MSNaiveDateTime.t()SupportedMillisecond precision.
TIMESTAMPNaiveDateTime.t()SupportedMicrosecond precision.
TIMESTAMP_NSQuackDB.NanosecondTimestamp.t()SupportedPreserves nanoseconds since Unix epoch.
TIME WITH TIME ZONEQuackDB.TimeWithTimeZone.t()SupportedPreserves time-of-day and UTC offset seconds.
TIMESTAMPTZDateTime.t()SupportedDecoded as UTC.
INTERVALQuackDB.Interval.t()SupportedPreserves DuckDB month, day, and microsecond components.

Nested types

DuckDB typeElixir valueStatusNotes
LISTlistSupportedIncludes empty lists and null elements.
STRUCTmap with string keysSupportedNull child values are preserved.
ARRAYlistSupportedFixed-size arrays are returned as Elixir lists.
MAPmapSupportedMap entries are converted to Elixir maps; duplicate-key policy follows Map.put/3.

Append encoding

QuackDB.insert_rows/4 supports scalar append values plus nested LIST, STRUCT, ARRAY, and MAP columns when explicit column specs are provided. Temporal append values use Elixir's Calendar conversion APIs and are encoded in DuckDB's ISO calendar representation.

Vector encodings

DuckDB vector encodingStatus
FlatSupported
ConstantSupported
DictionarySupported
SequenceSupported
FSSTUnsupported; QuackDB has an optional internal :fsst bridge, but current DuckDB Quack serialization flattens FSST vectors rather than exposing a compressed payload

SQL parameter literals

QuackDB formats query parameters as DuckDB SQL literals client-side because the current Quack request path does not expose server-side bind parameters.

Supported parameter values:

  • nil
  • booleans
  • integers
  • finite floats
  • Decimal.t()
  • strings
  • {:blob, binary}
  • Date.t()
  • Time.t()
  • NaiveDateTime.t()
  • DateTime.t()
  • QuackDB.Interval.t()
  • {:interval, months, days, micros}
  • lists containing supported parameter values

Unsupported parameter values raise explicit errors rather than being formatted lossy.

Notes

  • Unsupported types should fail explicitly rather than silently returning lossy values.
  • Result decoding is row-friendly today, but the protocol modules keep room for future columnar or Arrow-facing APIs.
  • Type behavior is validated with gated real DuckDB Quack integration tests where DuckDB currently exposes the type through the Quack extension.