Link Search Menu Expand Document

SapHanaDbHelper


This class implements IDbHelper for SAP HANA. It queries SAP HANA’s own SYS.TABLE_COLUMNS/SYS.CONSTRAINTS system views, scoped to the connection’s CURRENT_SCHEMA, to build the list of DbField objects RepoDB uses internally to generate SQL statements.

It is automatically registered by SapHanaBootstrap — you do not need to instantiate it directly under normal use.

Properties

NameDescription
DbTypeResolverThe IResolver<string, Type> used to convert a SAP HANA column type name into its equivalent .NET CLR type. Defaults to SapHanaDbTypeNameToClientTypeResolver.

GetScopeIdentity

GetScopeIdentity/GetScopeIdentityAsync execute SELECT CURRENT_IDENTITY_VALUE() FROM DUMMY; against the connection.

Usability

Only override this if you need a custom type resolver.

var dbHelper = new SapHanaDbHelper(new MyCustomSapHanaDbTypeNameToClientTypeResolver());
DbHelperMapper.Add<HanaConnection>(dbHelper, true);