HanaConnectionManager
Class HanaConnectionManager
Connection manager of a classic ADO.NET connection to a SAP HANA database.
Inheritance
Inherited Members
Namespace: ETLBox.Sap.Hana
Assembly: ETLBox.Sap.Hana.dll
Syntax
public class HanaConnectionManager : DbConnectionManager<HanaConnection, HanaTransaction, HanaParameter>, IConnectionManager<HanaConnection, HanaTransaction>, IConnectionManager, IDisposable
Constructors
HanaConnectionManager()
Declaration
public HanaConnectionManager()
HanaConnectionManager(HanaConnectionString)
Declaration
public HanaConnectionManager(HanaConnectionString connectionString)
Parameters
Type | Name | Description |
---|---|---|
HanaConnectionString | connectionString |
HanaConnectionManager(string)
Declaration
public HanaConnectionManager(string connectionString)
Parameters
Type | Name | Description |
---|---|---|
string | connectionString |
Properties
ConnectionType
The database type for the connection manager.
Declaration
public override ConnectionType ConnectionType { get; protected set; }
Property Value
Type | Description |
---|---|
ConnectionType |
Overrides
MaxParameterSizeBulkCopy
Returns the maximum amount of parameters that can be used for bulk inserts.
Declaration
public override int MaxParameterSizeBulkCopy { get; set; }
Property Value
Type | Description |
---|---|
int |
Overrides
MaxParameterSizeSql
Returns the maximum amount of parameters that can be passed into a sql query.
Declaration
public override int MaxParameterSizeSql { get; set; }
Property Value
Type | Description |
---|---|
int |
Overrides
PP
The character that is used in front of parameter names in query to identify the parameter. Most databases use the '@' character, some use ':'.
Declaration
public override string PP { get; protected set; }
Property Value
Type | Description |
---|---|
string |
Overrides
QB
The quotation begin character that is used in the database. E.g. SqlServer uses: '[' and Postgres: '"'
Declaration
public override string QB { get; protected set; }
Property Value
Type | Description |
---|---|
string |
Overrides
QE
The quotation end character that is used in the database. E.g. SqlServer uses: ']' and Postgres: '"'
Declaration
public override string QE { get; protected set; }
Property Value
Type | Description |
---|---|
string |
Overrides
SupportDatabases
Indicates if database server does support multiple databases. A database in ETLBox means a schema in MySql.
Declaration
public override bool SupportDatabases { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
Overrides
SupportIndexes
Indicates if database server does support indexes.
Declaration
public override bool SupportIndexes { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
Overrides
SupportProcedures
Indicates if the database supports procedures
Declaration
public override bool SupportProcedures { get; protected set; }
Property Value
Type | Description |
---|---|
bool |
Overrides
UseSqlBulkOperations
By default bulk inserts are done using sql. This normally provides better performance. If you want to insert data using HanaBulkCopy, set this option to false.
Declaration
public bool UseSqlBulkOperations { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
BulkDelete(ITableData)
Performs a bulk delete
Declaration
public override void BulkDelete(ITableData data)
Parameters
Type | Name | Description |
---|---|---|
ITableData | data | Batch of data |
Overrides
BulkInsert(ITableData)
Performs a bulk insert
Declaration
public override void BulkInsert(ITableData data)
Parameters
Type | Name | Description |
---|---|---|
ITableData | data | Batch of data |
Overrides
BulkSelect(ITableData, ICollection<string>, Action, Action, params Action<object>[])
Performs a bulk select
Declaration
public override void BulkSelect(ITableData data, ICollection<string> selectColumnNames, Action beforeRowReadAction, Action afterRowReadAction, params Action<object>[] rowActions)
Parameters
Type | Name | Description |
---|---|---|
ITableData | data | Batch of data needed for the where condition |
ICollection<string> | selectColumnNames | Column names included in the select |
Action | beforeRowReadAction | Action invoked before any data is read |
Action | afterRowReadAction | Action invoked after all data is read |
Action<object>[] | rowActions |
Overrides
BulkUpdate(ITableData, ICollection<string>, ICollection<string>)
Performs a bulk update
Declaration
public override void BulkUpdate(ITableData data, ICollection<string> setColumnNames, ICollection<string> joinColumnNames)
Parameters
Type | Name | Description |
---|---|---|
ITableData | data | Batch of data |
ICollection<string> | setColumnNames | The column names used in the set part of the update statement |
ICollection<string> | joinColumnNames | The column names to join for the update |
Overrides
CleanUpBulkInsert(string)
Called after the whole bulk insert operation to change back settings made to improve bulk insert performance
Declaration
public override void CleanUpBulkInsert(string tablename)
Parameters
Type | Name | Description |
---|---|---|
string | tablename |
Overrides
Clone()
Cretes a clone of the current connection manager
Declaration
public override IConnectionManager Clone()
Returns
Type | Description |
---|---|
IConnectionManager | A instance copy of the current connection manager |
Overrides
PrepareBulkInsert(string)
Performs preparations needed to improved performance of a bulk insert operation
Declaration
public override void PrepareBulkInsert(string tablename)
Parameters
Type | Name | Description |
---|---|---|
string | tablename |
Overrides
SqlBulkInsert(ITableData)
Declaration
public void SqlBulkInsert(ITableData data)
Parameters
Type | Name | Description |
---|---|---|
ITableData | data |