Skip to main content

Supported Databases

Each database has its own type hierarchy that knows exactly how to read and write values. Full roundtrip fidelity for every type — read a value from the database and write it back without loss or corruption.

Databases

  • PostgreSQL — arrays, ranges, geometric types, network types, JSON, text search, and all the exotic ones
  • MariaDB / MySQL — unsigned integers, spatial types, sets, JSON, and year types
  • DuckDB — lists, structs, maps, unions, enums, and 128-bit integers
  • Oracle — OBJECT types, nested tables, VARRAYs, intervals, and LOB types
  • SQL Server — geography, geometry, hierarchyid, and Unicode types
  • DB2 — standard SQL types with DB2-specific handling

Type-Safe Database Types

Each database has its own typed hierarchy:

// PostgreSQL types
val intArray: PgType<IntArray> = PgTypes.int4ArrayUnboxed
val dateRange: PgType<Range<LocalDate>> = PgTypes.daterange

// MariaDB types
val json: MariaType<Json> = MariaTypes.json

// DuckDB types
val map: DuckDbType<Map<String, Int>> = DuckDbTypes.varchar.mapTo(DuckDbTypes.integer)