Class CockroachDBSupport
java.lang.Object
io.bloviate.ext.AbstractDatabaseSupport
io.bloviate.ext.PostgresSupport
io.bloviate.ext.CockroachDBSupport
- All Implemented Interfaces:
DatabaseSupport
CockroachDB-specific
DatabaseSupport.
CockroachDB is reached through the PostgreSQL JDBC driver and is wire-compatible with
PostgreSQL, so its columns surface through JDBC exactly as PostgreSQL's do (UUID, JSONB,
INET, INTERVAL, bit strings, and _text/_int4/_int8 arrays). This
class therefore extends PostgresSupport and inherits its full type handling; it
exists as a distinct type for explicit selection and product-name resolution.
- Since:
- 1.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates the CockroachDB support with its default configuration. -
Method Summary
Modifier and TypeMethodDescriptionCockroachDB ignores the PostgreSQL driver'sreWriteBatchedInsertsparameter, so there is nothing to recommend; overridesPostgresSupport.batchRewriteUrlParameter()back tonull.readConstraints(Connection connection, String schema, String table) Constraint reading is PostgreSQL-specific (issue #479 first cut); CockroachDB's catalog differs, so it overridesPostgresSupport's reader back to none.booleanCockroachDB does not support the unordered bulk-load path.Methods inherited from class PostgresSupport
configure, disableConstraints, enableConstraintsMethods inherited from class AbstractDatabaseSupport
getDataGenerator
-
Constructor Details
-
CockroachDBSupport
public CockroachDBSupport()Creates the CockroachDB support with its default configuration.
-
-
Method Details
-
batchRewriteUrlParameter
CockroachDB ignores the PostgreSQL driver'sreWriteBatchedInsertsparameter, so there is nothing to recommend; overridesPostgresSupport.batchRewriteUrlParameter()back tonull.- Specified by:
batchRewriteUrlParameterin interfaceDatabaseSupport- Overrides:
batchRewriteUrlParameterin classPostgresSupport- Returns:
null- Since:
- 2.10.0
-
readConstraints
public Map<String, ColumnConstraint> readConstraints(Connection connection, String schema, String table) Constraint reading is PostgreSQL-specific (issue #479 first cut); CockroachDB's catalog differs, so it overridesPostgresSupport's reader back to none.- Specified by:
readConstraintsin interfaceDatabaseSupport- Overrides:
readConstraintsin classPostgresSupport- Parameters:
connection- an open connection to query the catalog withschema- the table's schema (may be null for the default schema)table- the table name- Returns:
- an empty map
- Since:
- 2.14.0
-
supportsBulkLoad
public boolean supportsBulkLoad()CockroachDB does not support the unordered bulk-load path. It has nosession_replication_roleswitch, and its foreign keys and secondary indexes are maintained transactionally across a distributed cluster, so there is no cheap session-level way to disable enforcement. AnUNORDERED_BULKrequest therefore falls back to the ordered level-parallel fill path. OverridesPostgresSupport.supportsBulkLoad()back tofalse.- Specified by:
supportsBulkLoadin interfaceDatabaseSupport- Overrides:
supportsBulkLoadin classPostgresSupport- Returns:
false- Since:
- 2.17.0
-