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:
- Kotlin
- Java
- Scala
// 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)
// PostgreSQL types
PgType<int[]> intArray = PgTypes.int4ArrayUnboxed;
PgType<Range<LocalDate>> dateRange = PgTypes.daterange;
PgType<PGpoint> point = PgTypes.point;
// MariaDB types
MariaType<Json> json = MariaTypes.json;
// DuckDB types
DuckDbType<Map<String, Integer>> map = DuckDbTypes.varchar.mapTo(DuckDbTypes.integer);
// PostgreSQL types
val intArray: PgType[Array[Int]] = PgTypes.int4ArrayUnboxed
val dateRange: PgType[Range[LocalDate]] = PgTypes.daterange
// MariaDB types
val json: MariaType[Json] = MariaTypes.json
// DuckDB types
val map: DuckDbType[java.util.Map[String, Int]] = DuckDbTypes.varchar.mapTo(DuckDbTypes.integer)