Table of Contents

Class SapHanaOdbcDataProvider

Namespace
LinqToDB.DataProvider.SapHana
Assembly
linq2db.dll
public class SapHanaOdbcDataProvider : DynamicDataProviderBase<OdbcProviderAdapter>, IDataProvider
Inheritance
SapHanaOdbcDataProvider
Implements
Inherited Members
Extension Methods

Constructors

SapHanaOdbcDataProvider()

public SapHanaOdbcDataProvider()

Properties

SupportedTableOptions

public override TableOptions SupportedTableOptions { get; }

Property Value

TableOptions

Methods

ConvertParameterType(Type, DbDataType)

public override Type ConvertParameterType(Type type, DbDataType dataType)

Parameters

type Type
dataType DbDataType

Returns

Type

CreateSqlBuilder(MappingSchema, DataOptions)

public override ISqlBuilder CreateSqlBuilder(MappingSchema mappingSchema, DataOptions dataOptions)

Parameters

mappingSchema MappingSchema
dataOptions DataOptions

Returns

ISqlBuilder

ExecuteScope(DataConnection)

Creates disposable object, which should be disposed by caller after database query execution completed. Could be used to execute provider's method with scope-specific settings, e.g. with Invariant culture to workaround incorrect culture handling in provider.

public override IExecutionScope ExecuteScope(DataConnection dataConnection)

Parameters

dataConnection DataConnection

Current data connection object.

Returns

IExecutionScope

Scoped execution disposable object or null if provider doesn't need scoped configuration.

GetQueryParameterNormalizer()

Returns instance of IQueryParametersNormalizer, which implements normalization logic for parameters of single query. E.g. it could include:

  • trimming names that are too long
  • removing/replacing unsupported characters
  • name deduplication for parameters with same name
. For implementation without state it is recommended to return static instance. E.g. this could be done for providers with positional parameters that ignore names.
public override IQueryParametersNormalizer GetQueryParameterNormalizer()

Returns

IQueryParametersNormalizer

GetSchemaProvider()

public override ISchemaProvider GetSchemaProvider()

Returns

ISchemaProvider

GetSqlOptimizer(DataOptions)

public override ISqlOptimizer GetSqlOptimizer(DataOptions dataOptions)

Parameters

dataOptions DataOptions

Returns

ISqlOptimizer

InitCommand(DataConnection, DbCommand, CommandType, string, DataParameter[]?, bool)

Initializes DataConnection command object.

public override DbCommand InitCommand(DataConnection dataConnection, DbCommand command, CommandType commandType, string commandText, DataParameter[]? parameters, bool withParameters)

Parameters

dataConnection DataConnection

Data connection instance to initialize with new command.

command DbCommand

Command instance to initialize.

commandType CommandType

Type of command.

commandText string

Command SQL.

parameters DataParameter[]

Optional list of parameters to add to initialized command.

withParameters bool

Flag to indicate that command has parameters. Used to configure parameters support when method called without parameters and parameters added later to command.

Returns

DbCommand

Initialized command instance.

IsDBNullAllowed(DataOptions, DbDataReader, int)

public override bool? IsDBNullAllowed(DataOptions options, DbDataReader reader, int idx)

Parameters

options DataOptions
reader DbDataReader
idx int

Returns

bool?

SetParameter(DataConnection, DbParameter, string, DbDataType, object?)

public override void SetParameter(DataConnection dataConnection, DbParameter parameter, string name, DbDataType dataType, object? value)

Parameters

dataConnection DataConnection
parameter DbParameter
name string
dataType DbDataType
value object

SetParameterType(DataConnection, DbParameter, DbDataType)

protected override void SetParameterType(DataConnection dataConnection, DbParameter parameter, DbDataType dataType)

Parameters

dataConnection DataConnection
parameter DbParameter
dataType DbDataType