SapHanaDbSetting

A setting class used for the SAP HANA data provider.

This class is the BaseDbSetting-derived implementation for SAP HANA. It is automatically registered by SapHanaBootstrap — you do not need to instantiate it directly under normal use.

Configured Values

Property Value
AreTableHintsSupported false
ClosingQuote "
DefaultSchema null
IsAffectedRowsSupported true
IsDirectionSupported false
IsExecuteReaderDisposable true
IsMultiStatementExecutable false
IsPreparable true
IsTransactionSupported true
IsUseUpsert false
MaxParameterCount 2098
MultiStatementSeparator ;
OpeningQuote "
ParameterPrefix :
RequiresDbTypeBeforeValue false
SkipsUnreferencedParameters false
SqlTextParameterPrefix :

IsMultiStatementExecutable is false — SAP HANA’s ADO.NET client rejects a command text containing more than one SQL statement. Unlike VerticaDbSetting, there is no IsInsertAllBatchable override here, so InsertAll/MergeAll/UpdateAll all issue one round trip per row; passing an explicit batchSize greater than 1 to any of them throws a NotSupportedException.

Unlike Firebird, Oracle, and Vertica, no TrimTrailingSemicolon step is needed anywhere in SapHanaStatementBuilder — SAP HANA’s ADO.NET client accepts a single trailing ; on an otherwise-standalone statement; it only rejects multiple statements in one command text.

Usability

Use DbSettingMapper to override it with a custom implementation.

DbSettingMapper.Add(typeof(HanaConnection), new MyCustomSapHanaDbSetting(), true);

RepoDb.SapHana.BulkOperations ships SapHanaBulkDbSetting (and its ISapHanaBulkDbSetting interface), a subclass that adds a WriteToServerExecution setting for controlling the bulk operations’ Async write strategy, and a BulkColumnMappingsBehavior setting (see SapHanaBulkColumnMappingsBehavior) for controlling the source-to-destination column-mapping validation. It is not registered by default — pass an instance to UseSapHana() or register it via DbSettingMapper to opt in.