Skip to main content

Database Setup

For complete installation and configuration instructions, see the Getting Started guide.

Quick Reference​

Supported Databases​

DatabaseStatus
PostgreSQLFull support including domains, enums, arrays, JSON, UUID
MariaDB/MySQLFull support including unsigned types
SQL ServerFull support including T-SQL features
OracleFull support including OBJECT and MULTISET types
DuckDBFull support for embedded analytical workloads
IBM DB2Full support including distinct types

Configuration Example​

sources:
postgres:
type: postgresql
host: localhost
port: 5432
database: myapp
username: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}
schemas: [public, sales]

output:
path: ./generated
package: com.myapp.db
language: java

Generate Code​

typr generate

Database-Specific Features​

Each database has unique features that Typr models with full fidelity:

  • PostgreSQL: Arrays, enums, domains, composite types, JSON/JSONB
  • MariaDB: Unsigned integers, ENUMs, SETs
  • Oracle: OBJECT types, nested tables, MULTISET
  • SQL Server: Alias types, table-valued parameters
  • DuckDB: Nested types, structs, lists

See Type Safety for details on how these are represented in generated code.

Next Steps​