edit

Data types

Warning

rdbc-pgsql project and this documentation is still a work in progress. It's not ready yet for production use.

General type mapping is described in rdbc documentation here. Said chapter refers to the types by their standard names. This section describes type mapping using PostgreSQL type names.

Type mapping

Following table lists mapping between Scala and supported PostgreSQL types.

PostgreSQL name Standard name Scala type
char CHAR/NCHAR String
varchar VARCHAR/NVARCHAR String
text CLOB String
bytea BLOB Array[Byte]
bool BOOLEAN Boolean
numeric NUMERIC io.rdbc.sapi.SqlNumeric
float4 REAL Float
float8 FLOAT Double
int2 SMALLINT Short
int4 INTEGER Int
int8 BIGINT Long
date DATE java.time.LocalDate
time TIME java.time.LocalTime
timestamp TIMESTAMP java.time.LocalDateTime
timestamp with time zone TIMESTAMP WITH TIME ZONE java.time.Instant
uuid none java.util.UUID