Roadmap item: Additional database support (Oracle, SQL Server).
Background
Database support is an SPI: DatabaseSupport (interface) + AbstractDatabaseSupport (a Map<JDBCType, GeneratorFactory> registry seeded by registerDefaults(), customized via the configure(Map) hook). Selection is DatabaseSupport.forProduct(productName) — a case-insensitive substring match that today knows cockroach, mysql, postgres, else DefaultSupport. The library itself is driver-agnostic (JDBC drivers are test-scoped only).
Adding a database = a new *Support subclass with a configure() override + a forProduct branch + integration coverage. The recent PostgreSQL/MySQL work (#444) is the template, including the empirical discovery step (dump DATA_TYPE/TYPE_NAME per column from the real driver before coding the dispatch).
Scope
OracleSupport
The hard part is Oracle's type model:
NUMBER is the single numeric type — map by precision/scale (scale 0 → integer-family, else BigDecimal). maxDigits/maxSize from metadata drive this.
VARCHAR2, NVARCHAR2, CHAR, NCHAR → string generators
CLOB, NCLOB, BLOB, RAW/LONG RAW
DATE (Oracle DATE includes time-of-day), TIMESTAMP, TIMESTAMP WITH [LOCAL] TIME ZONE
BINARY_FLOAT, BINARY_DOUBLE
INTERVAL YEAR TO MONTH, INTERVAL DAY TO SECOND
- No native
BOOLEAN before Oracle 23c (23c adds it) — decide target version
- ojdbc surfaces several types via
oracle.jdbc.OracleTypes; confirm empirically
Driver: com.oracle.database.jdbc:ojdbc11 (test). Container: org.testcontainers:oracle-free (gvenzl/oracle-free image).
SQLServerSupport
UNIQUEIDENTIFIER (GUID string — reuse/extend UUIDGenerator)
BIT → boolean; TINYINT is unsigned 0–255 (matches the existing default generator)
DATETIME, DATETIME2, SMALLDATETIME, DATETIMEOFFSET, DATE, TIME
MONEY, SMALLMONEY
NVARCHAR, NCHAR, NTEXT, VARBINARY, IMAGE
XML (reuse XmlGenerator)
- CLR types
HIERARCHYID, GEOGRAPHY, GEOMETRY → out of scope; should throw UnsupportedOperationException (consistent with how unsupported PG/MySQL types behave today)
Driver: com.microsoft.sqlserver:mssql-jdbc (test). Container: org.testcontainers:mssqlserver (requires acceptLicense()).
Shared
DatabaseSupport.forProduct: add oracle and microsoft sql server/sqlserver branches + cases in DatabaseSupportSelectionTest.
create_tables.{oracle,sqlserver}.sql comprehensive type schemas + fillTestTables integration tests (mirror PostgresFillerTest/MySqlFillerTest).
- Unit coverage in
DatabaseSupportTest for the new dispatch.
Acceptance criteria
Notes
Worth splitting into two PRs (one per database) — each needs its own driver, container, and EULA/image considerations. Oracle NUMBER mapping is the main design risk; do the empirical discovery dump first.
Roadmap item: Additional database support (Oracle, SQL Server).
Background
Database support is an SPI:
DatabaseSupport(interface) +AbstractDatabaseSupport(aMap<JDBCType, GeneratorFactory>registry seeded byregisterDefaults(), customized via theconfigure(Map)hook). Selection isDatabaseSupport.forProduct(productName)— a case-insensitive substring match that today knowscockroach,mysql,postgres, elseDefaultSupport. The library itself is driver-agnostic (JDBC drivers are test-scoped only).Adding a database = a new
*Supportsubclass with aconfigure()override + aforProductbranch + integration coverage. The recent PostgreSQL/MySQL work (#444) is the template, including the empirical discovery step (dumpDATA_TYPE/TYPE_NAMEper column from the real driver before coding the dispatch).Scope
OracleSupportThe hard part is Oracle's type model:
NUMBERis the single numeric type — map by precision/scale (scale 0 → integer-family, elseBigDecimal).maxDigits/maxSizefrom metadata drive this.VARCHAR2,NVARCHAR2,CHAR,NCHAR→ string generatorsCLOB,NCLOB,BLOB,RAW/LONG RAWDATE(OracleDATEincludes time-of-day),TIMESTAMP,TIMESTAMP WITH [LOCAL] TIME ZONEBINARY_FLOAT,BINARY_DOUBLEINTERVAL YEAR TO MONTH,INTERVAL DAY TO SECONDBOOLEANbefore Oracle 23c (23c adds it) — decide target versionoracle.jdbc.OracleTypes; confirm empiricallyDriver:
com.oracle.database.jdbc:ojdbc11(test). Container:org.testcontainers:oracle-free(gvenzl/oracle-free image).SQLServerSupportUNIQUEIDENTIFIER(GUID string — reuse/extendUUIDGenerator)BIT→ boolean;TINYINTis unsigned 0–255 (matches the existing default generator)DATETIME,DATETIME2,SMALLDATETIME,DATETIMEOFFSET,DATE,TIMEMONEY,SMALLMONEYNVARCHAR,NCHAR,NTEXT,VARBINARY,IMAGEXML(reuseXmlGenerator)HIERARCHYID,GEOGRAPHY,GEOMETRY→ out of scope; should throwUnsupportedOperationException(consistent with how unsupported PG/MySQL types behave today)Driver:
com.microsoft.sqlserver:mssql-jdbc(test). Container:org.testcontainers:mssqlserver(requiresacceptLicense()).Shared
DatabaseSupport.forProduct: addoracleandmicrosoft sql server/sqlserverbranches + cases inDatabaseSupportSelectionTest.create_tables.{oracle,sqlserver}.sqlcomprehensive type schemas +fillTestTablesintegration tests (mirrorPostgresFillerTest/MySqlFillerTest).DatabaseSupportTestfor the new dispatch.Acceptance criteria
OracleSupport+SQLServerSupportregistered and selectable viaforProductUnsupportedOperationExceptionrather than generating invalid dataNotes
Worth splitting into two PRs (one per database) — each needs its own driver, container, and EULA/image considerations. Oracle
NUMBERmapping is the main design risk; do the empirical discovery dump first.