Releases for RepoDb.Vertica
View the NuGet package here or download it directly here.
RepoDb.Vertica (v0.0.1-alpha) - Preview
Released: TBA
New
First (alpha) release of the Vertica provider for RepoDB, built on top of Vertica.Data. Targets netstandard2.0, .NET 8, .NET 9, and .NET 10.
Verification status: this package has been implemented and reviewed, but not yet exercised against a live Vertica instance. Verify the Merge/MergeAll compound-statement behavior in particular (see Known limitations below) before relying on this package in production.
What’s included
- VerticaBootstrap / VerticaConfiguration
.UseVertica()— initializes RepoDB for use withVerticaConnection(GlobalConfiguration.Setup().UseVertica()), mapping the VerticaDbSetting, VerticaDbHelper, and VerticaStatementBuilder to everyVerticaConnection. Also forcesCultureInfo.CurrentCulturetoCultureInfo.InvariantCultureprocess-wide, working aroundVertica.Dataformatting date-like values using the ambient thread culture. - VerticaDbSetting — Vertica-specific behavior:
"for opening/closing identifier quotes,@parameter prefix, no table hints, no multi-statement command text support (IsMultiStatementExecutable = false) except for InsertAll (IsInsertAllBatchable = true), a lowerMaxParameterCountof1500, and bothRequiresDbTypeBeforeValueandSkipsUnreferencedParametersset totrue(see the Core release notes for what those two control). - VerticaStatementBuilder — generates Vertica-flavored SQL for every operation:
LIMIT/LIMIT ... OFFSETpaging, a genuine multi-rowVALUESlist for InsertAll, and anUPDATE ...; INSERT ... WHERE NOT EXISTS (...)pair (with a follow-upSELECT LAST_INSERT_ID()when a key is needed) for Merge/MergeAll — never a nativeMERGE, since Vertica rejects that statement outright against any table with anIDENTITY/AUTO_INCREMENTcolumn. Truncate compiles to a plainDELETE FROM t, since Vertica has noTRUNCATE TABLEstatement. - VerticaDbHelper — schema/type discovery (
GetFields/GetFieldsAsync) sourced fromv_catalog.columns/v_catalog.primary_keys.GetScopeIdentity/GetScopeIdentityAsyncrunSELECT LAST_INSERT_ID(). - Resolvers — VerticaConvertFieldResolver (casts a field to its Vertica type when a conversion is needed, e.g. typed ExecuteQuery results), VerticaDbTypeNameToClientTypeResolver (maps the type names returned by
v_catalog.columnsto .NET CLR types — widened tolong/doublesince Vertica has no distinct integer/float storage widths), DbTypeToVerticaStringNameResolver (mapsSystem.Data.DbTypeto Vertica SQL type names, e.g.DbType.Guid→UUID), and DbTypeNameToColumnNameResolver (maps a Vertica database type name to its base column type keyword; used internally by RepoDb.Vertica.BulkOperations to generate pseudo-table column definitions). - TimeToDateTimePropertyHandler — re-bases the date component of a value read back from a
TIMEcolumn ontoDateTime’s default date, since Vertica’s driver returns aTIMEvalue combined with today’s date rather than a fixed placeholder. - Parameter attributes mirroring
VerticaParametermembers, settable per entity property: VerticaType, SourceColumn, SourceColumnNullMapping, and SourceVersion.
Known limitations (v1)
- Merge/MergeAll compile a compound
UPDATE ...; INSERT ...command text — both halves carrying parameters — joined by;into a single string submitted throughVerticaCommand.CommandText. This has not been verified against a live Vertica instance, and appears to conflict with the very restrictionIsInsertAllBatchable’s own remarks describe elsewhere: “a compound ("stmt1; stmt2") statement, whichVerticaCommandrefuses to execute once it carries a parameter.” Verify this specifically before relying on Merge/MergeAll in production. GetScopeIdentity/GetScopeIdentityAsyncrunSELECT LAST_INSERT_ID()— unverified against a live instance.- MergeAll/UpdateAll issue a separate round trip per row rather than a single batched statement, since
IsMultiStatementExecutableisfalseand neither has anIsInsertAllBatchable-style override. Passing an explicitbatchSizegreater than1to either throws aNotSupportedException. InsertAll is the exception — seeIsInsertAllBatchableabove. - No table hints of any kind —
AreTableHintsSupportedisfalse; passing a non-nullhintsargument to any operation throws aNotSupportedException. - No
TRUNCATE TABLEstatement (as of Vertica 5.0) — Truncate compiles toDELETE FROM twithout aWHEREclause, which, unlike a real truncate, does not reset anIDENTITYcolumn’s next value. MaxParameterCountdefaults to1500, lower than the2098most other providers default to.- No native GUID property handler —
DbType.Guidmaps to Vertica’s ownUUIDtype, but there is no dedicated property handler equivalent to other providers’GuidToByteArrayPropertyHandlerfor drivers that need an explicit conversion. - A second, near-duplicate property handler class (
RepoDb.PropertyHandlers.VerticaTimeToDateTimePropertyHandler, as opposed to the documentedRepoDb.PropertyHandlers.Vertica.TimeToDateTimePropertyHandler) exists in the source but is not referenced anywhere in the library or its tests — apparent leftover code from a refactor, not two intentionally-separate handlers. Only a standard Vertica server accessed via
Vertica.Datais tested against.- Referenced the
RepoDbpackagev1.16.0. - Referenced the
Vertica.Datapackagev24.3.0.