CockroachDB
This page contains the latest information of the releases of RepoDb.CockroachDb library.
View the NuGet package here or download it directly here.
RepoDb.CockroachDb (v0.0.1-alpha1) - Preview
Released: September 26, 2026
New
First (alpha) release of the dedicated CockroachDB provider for RepoDB, built on top of the Npgsql-backed RepoDb.Connector.CockroachDb — a thin ADO.NET wrapper and type-mapping layer that exposes CockroachDB-specific, CockroachDb-prefixed objects (CockroachDbConnection, CockroachDbParameter, CockroachDbType, etc.).
What’s included
CockroachDbBootstrap/CockroachDbGlobalConfiguration.UseCockroachDb()— initializes RepoDB for use withCockroachDbConnection(GlobalConfiguration.Setup().UseCockroachDb()), mapping theCockroachDbDbSetting,CockroachDbDbHelper, andCockroachDbStatementBuilder.CockroachDbDbSetting— CockroachDB-specific behavior:"-quoted identifiers,@parameter prefix,publicdefault schema, no table hints, no nativeUPSERTkeyword (Merge is built viaINSERT ... ON CONFLICT DO UPDATEinstead), and multi-statement command text support (IsMultiStatementExecutable = true,MultiStatementSeparator = ";").CockroachDbStatementBuilder— generates CockroachDB-flavored SQL for every operation:LIMIT/LIMIT ... OFFSETpaging,RETURNING-clause identity retrieval for Insert/InsertAll, andINSERT ... ON CONFLICT DO UPDATE ... RETURNINGfor Merge/MergeAll (withOVERRIDING SYSTEM VALUEso an explicit identity value on the entity is respected instead of silently ignored).CockroachDbDbHelper— schema/type discovery sourced frominformation_schema.columns(joined againstpg_index/pg_namespacefor primary-key and temp-schema detection),SELECT lastval();for identity retrieval, a one-time retry against a fresh connection onNpgsqlOperationInProgressException, and per-parameterDateOnly/TimeOnly/non-UTCDateTimecoercion (including inside arrays).- Resolvers — ClientTypeToCockroachDbTypeResolver, CockroachDbConvertFieldResolver, CockroachDbDbTypeNameToClientTypeResolver, CockroachDbDbTypeNameToCockroachDbTypeResolver, and DbTypeToCockroachDbStringNameResolver.
- Property handlers — TsQueryToStringPropertyHandler and TsVectorToStringPropertyHandler, mapping the full-text search
tsquery/tsvectortypes ontostringproperties (manual binding only). - Parameter attributes mirroring
CockroachDbParameter, settable per entity property: CockroachDbType, DbType, Direction, IsNullable, ParameterName, Precision, Scale, Size, SourceColumn, SourceColumnNullMapping, SourceVersion, and Value. - Targets .NET 8 and .NET 10.
Known limitations (v1)
RepoDb.Connector.CockroachDbis an independent, unofficial ADO.NET provider for CockroachDB (a thin wrapper over Npgsql) — not affiliated with or endorsed by Cockroach Labs, and still in early development.- InsertAll’s generated key retrieval assumes the
RETURNINGclause of a multi-rowINSERTreturns rows in the same order they were listed — this has not been independently verified against CockroachDB. - The spatial (
geometry,geography) types have no CLR representation and resolve totypeof(object). - No native GUID storage distinction beyond
uuid— arrays and other CockroachDB-only types not listed by ClientTypeToCockroachDbTypeResolver throw when an explicitCockroachDbTypecan’t be inferred.
Bumps
- Referenced the
RepoDbpackagev1.17.0-alpha2. - References the
RepoDb.Connector.CockroachDbpackagev0.0.1-alpha1.