Link Search Menu Expand Document

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 with VerticaConnection (GlobalConfiguration.Setup().UseVertica()), mapping the VerticaDbSetting, VerticaDbHelper, and VerticaStatementBuilder to every VerticaConnection. Also forces CultureInfo.CurrentCulture to CultureInfo.InvariantCulture process-wide, working around Vertica.Data formatting 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 lower MaxParameterCount of 1500, and both RequiresDbTypeBeforeValue and SkipsUnreferencedParameters set to true (see the Core release notes for what those two control).
  • VerticaStatementBuilder — generates Vertica-flavored SQL for every operation: LIMIT/LIMIT ... OFFSET paging, a genuine multi-row VALUES list for InsertAll, and an UPDATE ...; INSERT ... WHERE NOT EXISTS (...) pair (with a follow-up SELECT LAST_INSERT_ID() when a key is needed) for Merge/MergeAll — never a native MERGE, since Vertica rejects that statement outright against any table with an IDENTITY/AUTO_INCREMENT column. Truncate compiles to a plain DELETE FROM t, since Vertica has no TRUNCATE TABLE statement.
  • VerticaDbHelper — schema/type discovery (GetFields/GetFieldsAsync) sourced from v_catalog.columns/v_catalog.primary_keys. GetScopeIdentity/GetScopeIdentityAsync run SELECT 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.columns to .NET CLR types — widened to long/double since Vertica has no distinct integer/float storage widths), DbTypeToVerticaStringNameResolver (maps System.Data.DbType to Vertica SQL type names, e.g. DbType.GuidUUID), 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 TIME column onto DateTime’s default date, since Vertica’s driver returns a TIME value combined with today’s date rather than a fixed placeholder.
  • Parameter attributes mirroring VerticaParameter members, 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 through VerticaCommand.CommandText. This has not been verified against a live Vertica instance, and appears to conflict with the very restriction IsInsertAllBatchable’s own remarks describe elsewhere: “a compound ("stmt1; stmt2") statement, which VerticaCommand refuses to execute once it carries a parameter.” Verify this specifically before relying on Merge/MergeAll in production.
  • GetScopeIdentity/GetScopeIdentityAsync run SELECT LAST_INSERT_ID() — unverified against a live instance.
  • MergeAll/UpdateAll issue a separate round trip per row rather than a single batched statement, since IsMultiStatementExecutable is false and neither has an IsInsertAllBatchable-style override. Passing an explicit batchSize greater than 1 to either throws a NotSupportedException. InsertAll is the exception — see IsInsertAllBatchable above.
  • No table hints of any kind — AreTableHintsSupported is false; passing a non-null hints argument to any operation throws a NotSupportedException.
  • No TRUNCATE TABLE statement (as of Vertica 5.0) — Truncate compiles to DELETE FROM t without a WHERE clause, which, unlike a real truncate, does not reset an IDENTITY column’s next value.
  • MaxParameterCount defaults to 1500, lower than the 2098 most other providers default to.
  • No native GUID property handler — DbType.Guid maps to Vertica’s own UUID type, but there is no dedicated property handler equivalent to other providers’ GuidToByteArrayPropertyHandler for drivers that need an explicit conversion.
  • A second, near-duplicate property handler class (RepoDb.PropertyHandlers.VerticaTimeToDateTimePropertyHandler, as opposed to the documented RepoDb.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.Data is tested against.

  • Referenced the RepoDb package v1.16.0.
  • Referenced the Vertica.Data package v24.3.0.