Class AccessDataProvider
- Namespace
- LinqToDB.Internal.DataProvider.Access
- Assembly
- linq2db.dll
public abstract class AccessDataProvider : DynamicDataProviderBase<AccessProviderAdapter>, IDataProvider, IInfrastructure<IServiceProvider>
- Inheritance
-
objectAccessDataProvider
- Implements
- Inherited Members
- Extension Methods
Constructors
AccessDataProvider(string, AccessVersion, AccessProvider)
protected AccessDataProvider(string name, AccessVersion version, AccessProvider provider)
Parameters
namestringversionAccessVersionproviderAccessProvider
Properties
SupportedTableOptions
public override TableOptions SupportedTableOptions { get; }
Property Value
Methods
BulkCopyAsync<T>(DataOptions, ITable<T>, IAsyncEnumerable<T>, CancellationToken)
public override Task<BulkCopyRowsCopied> BulkCopyAsync<T>(DataOptions options, ITable<T> table, IAsyncEnumerable<T> source, CancellationToken cancellationToken) where T : notnull
Parameters
optionsDataOptionstableITable<T>sourceIAsyncEnumerable<T>cancellationTokenCancellationToken
Returns
Type Parameters
T
BulkCopyAsync<T>(DataOptions, ITable<T>, IEnumerable<T>, CancellationToken)
public override Task<BulkCopyRowsCopied> BulkCopyAsync<T>(DataOptions options, ITable<T> table, IEnumerable<T> source, CancellationToken cancellationToken) where T : notnull
Parameters
optionsDataOptionstableITable<T>sourceIEnumerable<T>cancellationTokenCancellationToken
Returns
Type Parameters
T
BulkCopy<T>(DataOptions, ITable<T>, IEnumerable<T>)
public override BulkCopyRowsCopied BulkCopy<T>(DataOptions options, ITable<T> table, IEnumerable<T> source) where T : notnull
Parameters
optionsDataOptionstableITable<T>sourceIEnumerable<T>
Returns
Type Parameters
T
CreateDmlService()
Override to opt-in to provider-specific DML mechanics (currently: "is this exception a
table-not-found" detection used by DropTable(throwExceptionIfNotExists: false)).
Providers whose DROP TABLE already expresses "if exists" in SQL don't need this —
leave it returning null and no suppression will be attempted.
protected override IDmlService CreateDmlService()
Returns
CreateMemberTranslator()
protected override IMemberTranslator CreateMemberTranslator()
Returns
CreateSqlBuilder(MappingSchema, DataOptions)
public override ISqlBuilder CreateSqlBuilder(MappingSchema mappingSchema, DataOptions dataOptions)
Parameters
mappingSchemaMappingSchemadataOptionsDataOptions
Returns
GetQueryParameterNormalizer()
Returns instance of <xref href="linq2db%3a%3aLinqToDB.Internal.DataProvider.IQueryParametersNormalizer" data-throw-if-not-resolved="false"></xref>, which implements normalization logic for parameters of single query.
E.g. it could include:
<ul><li>trimming names that are too long</li><li>removing/replacing unsupported characters</li><li>name deduplication for parameters with same name</li></ul>
. 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
GetSchemaProvider()
public override ISchemaProvider GetSchemaProvider()
Returns
GetSqlOptimizer(DataOptions)
public override ISqlOptimizer GetSqlOptimizer(DataOptions dataOptions)
Parameters
dataOptionsDataOptions
Returns
SetParameter(DataConnection, DbParameter, string, DbDataType, object?)
public override void SetParameter(DataConnection dataConnection, DbParameter parameter, string name, DbDataType dataType, object? value)
Parameters
dataConnectionDataConnectionparameterDbParameternamestringdataTypeDbDataTypevalueobject
SetParameterType(DataConnection, DbParameter, DbDataType)
protected override void SetParameterType(DataConnection dataConnection, DbParameter parameter, DbDataType dataType)
Parameters
dataConnectionDataConnectionparameterDbParameterdataTypeDbDataType