Class DataProviderBase
Inheritance
System.Object
DataProviderBase
Assembly: linq2db.dll
Syntax
public abstract class DataProviderBase : object, IDataProvider
Constructors
|
Improve this Doc
View Source
DataProviderBase(String, MappingSchema)
Declaration
protected DataProviderBase(string name, MappingSchema mappingSchema)
Parameters
Type |
Name |
Description |
System.String |
name |
|
MappingSchema |
mappingSchema |
|
Fields
|
Improve this Doc
View Source
ReaderExpressions
Declaration
public readonly ConcurrentDictionary<ReaderInfo, Expression> ReaderExpressions
Field Value
Type |
Description |
ConcurrentDictionary<ReaderInfo, Expression> |
|
Properties
|
Improve this Doc
View Source
ConnectionNamespace
Declaration
public abstract string? ConnectionNamespace { get; }
Property Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
DataReaderType
Declaration
public abstract Type DataReaderType { get; }
Property Value
|
Improve this Doc
View Source
ID
Declaration
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
MappingSchema
Declaration
public virtual MappingSchema MappingSchema { get; }
Property Value
|
Improve this Doc
View Source
Name
Declaration
public string Name { get; }
Property Value
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
OnConnectionCreated
Declaration
public static Func<IDataProvider, DbConnection, DbConnection>? OnConnectionCreated { get; set; }
Property Value
Type |
Description |
System.Nullable<Func<IDataProvider, DbConnection, DbConnection>> |
|
|
Improve this Doc
View Source
SqlProviderFlags
Declaration
public SqlProviderFlags SqlProviderFlags { get; }
Property Value
|
Improve this Doc
View Source
SupportedTableOptions
Declaration
public abstract TableOptions SupportedTableOptions { get; }
Property Value
|
Improve this Doc
View Source
TransactionsSupported
Declaration
public virtual bool TransactionsSupported { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
BulkCopy<T>(DataOptions, ITable<T>, IEnumerable<T>)
Declaration
public virtual BulkCopyRowsCopied BulkCopy<T>(DataOptions options, ITable<T> table, IEnumerable<T> source)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
BulkCopyAsync<T>(DataOptions, ITable<T>, IEnumerable<T>, CancellationToken)
Declaration
public virtual Task<BulkCopyRowsCopied> BulkCopyAsync<T>(DataOptions options, ITable<T> table, IEnumerable<T> source, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
DataOptions |
options |
|
ITable<T> |
table |
|
IEnumerable<T> |
source |
|
CancellationToken |
cancellationToken |
|
Returns
Type Parameters
|
Improve this Doc
View Source
ClearCommandParameters(DbCommand)
Declaration
public virtual void ClearCommandParameters(DbCommand command)
Parameters
Type |
Name |
Description |
DbCommand |
command |
|
|
Improve this Doc
View Source
ConvertParameterType(Type, DbDataType)
Declaration
public virtual Type ConvertParameterType(Type type, DbDataType dataType)
Parameters
Type |
Name |
Description |
Type |
type |
|
DbDataType |
dataType |
|
Returns
|
Improve this Doc
View Source
CreateConnection(String)
Declaration
public DbConnection CreateConnection(string connectionString)
Parameters
Type |
Name |
Description |
System.String |
connectionString |
|
Returns
Type |
Description |
DbConnection |
|
|
Improve this Doc
View Source
CreateConnectionInternal(String)
Declaration
protected abstract DbConnection CreateConnectionInternal(string connectionString)
Parameters
Type |
Name |
Description |
System.String |
connectionString |
|
Returns
Type |
Description |
DbConnection |
|
|
Improve this Doc
View Source
CreateSqlBuilder(MappingSchema, DataOptions)
Declaration
public abstract ISqlBuilder CreateSqlBuilder(MappingSchema mappingSchema, DataOptions dataOptions)
Parameters
Returns
|
Improve this Doc
View Source
DisposeCommand(DbCommand)
Declaration
public virtual void DisposeCommand(DbCommand command)
Parameters
Type |
Name |
Description |
DbCommand |
command |
|
|
Improve this Doc
View Source
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.
Declaration
public virtual IExecutionScope ExecuteScope(DataConnection dataConnection)
Parameters
Type |
Name |
Description |
DataConnection |
dataConnection |
Current data connection object.
|
Returns
Type |
Description |
IExecutionScope |
Scoped execution disposable object or null if provider doesn't need scoped configuration.
|
|
Improve this Doc
View Source
FindExpression(ReaderInfo, out Nullable<Expression>)
Declaration
protected bool FindExpression(ReaderInfo info, out Expression? expr)
Parameters
Type |
Name |
Description |
ReaderInfo |
info |
|
System.Nullable<Expression> |
expr |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetCommandBehavior(CommandBehavior)
Declaration
public virtual CommandBehavior GetCommandBehavior(CommandBehavior commandBehavior)
Parameters
Type |
Name |
Description |
CommandBehavior |
commandBehavior |
|
Returns
Type |
Description |
CommandBehavior |
|
|
Improve this Doc
View Source
GetConnectionInfo(DataConnection, String)
Declaration
public virtual object? GetConnectionInfo(DataConnection dataConnection, string parameterName)
Parameters
Type |
Name |
Description |
DataConnection |
dataConnection |
|
System.String |
parameterName |
|
Returns
Type |
Description |
System.Nullable<System.Object> |
|
|
Improve this Doc
View Source
GetReaderExpression(DbDataReader, Int32, Expression, Type)
Declaration
public virtual Expression GetReaderExpression(DbDataReader reader, int idx, Expression readerExpression, Type toType)
Parameters
Type |
Name |
Description |
DbDataReader |
reader |
|
System.Int32 |
idx |
|
Expression |
readerExpression |
|
Type |
toType |
|
Returns
Type |
Description |
Expression |
|
|
Improve this Doc
View Source
GetSchemaProvider()
Declaration
public abstract ISchemaProvider GetSchemaProvider()
Returns
|
Improve this Doc
View Source
GetSqlOptimizer(DataOptions)
Declaration
public abstract ISqlOptimizer GetSqlOptimizer(DataOptions dataOptions)
Parameters
Returns
|
Improve this Doc
View Source
InitCommand(DataConnection, DbCommand, CommandType, String, DataParameter[], Boolean)
Declaration
public virtual DbCommand InitCommand(DataConnection dataConnection, DbCommand command, CommandType commandType, string commandText, DataParameter[] parameters, bool withParameters)
Parameters
Type |
Name |
Description |
DataConnection |
dataConnection |
|
DbCommand |
command |
|
CommandType |
commandType |
|
System.String |
commandText |
|
DataParameter[] |
parameters |
|
System.Boolean |
withParameters |
|
Returns
Type |
Description |
DbCommand |
|
|
Improve this Doc
View Source
InitContext(IDataContext)
Declaration
public virtual void InitContext(IDataContext dataContext)
Parameters
|
Improve this Doc
View Source
IsDBNullAllowed(DataOptions, DbDataReader, Int32)
Declaration
public virtual bool? IsDBNullAllowed(DataOptions options, DbDataReader reader, int idx)
Parameters
Type |
Name |
Description |
DataOptions |
options |
|
DbDataReader |
reader |
|
System.Int32 |
idx |
|
Returns
Type |
Description |
System.Nullable<System.Boolean> |
|
|
Improve this Doc
View Source
NormalizeTypeName(Nullable<String>)
Declaration
protected virtual string? NormalizeTypeName(string? typeName)
Parameters
Type |
Name |
Description |
System.Nullable<System.String> |
typeName |
|
Returns
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
SetCharField(String, Expression<Func<DbDataReader, Int32, String>>)
Declaration
protected void SetCharField(string dataTypeName, Expression<Func<DbDataReader, int, string>> expr)
Parameters
Type |
Name |
Description |
System.String |
dataTypeName |
|
Expression<Func<DbDataReader, System.Int32, System.String>> |
expr |
|
|
Improve this Doc
View Source
SetCharFieldToType<T>(String, Expression<Func<DbDataReader, Int32, String>>)
Declaration
protected void SetCharFieldToType<T>(string dataTypeName, Expression<Func<DbDataReader, int, string>> expr)
Parameters
Type |
Name |
Description |
System.String |
dataTypeName |
|
Expression<Func<DbDataReader, System.Int32, System.String>> |
expr |
|
Type Parameters
|
Improve this Doc
View Source
SetField<TP, T>(Expression<Func<TP, Int32, T>>)
Declaration
protected void SetField<TP, T>(Expression<Func<TP, int, T>> expr)
Parameters
Type |
Name |
Description |
Expression<Func<TP, System.Int32, T>> |
expr |
|
Type Parameters
|
Improve this Doc
View Source
SetField<TP, T>(String, Expression<Func<TP, Int32, T>>)
Declaration
protected void SetField<TP, T>(string dataTypeName, Expression<Func<TP, int, T>> expr)
Parameters
Type |
Name |
Description |
System.String |
dataTypeName |
|
Expression<Func<TP, System.Int32, T>> |
expr |
|
Type Parameters
|
Improve this Doc
View Source
SetField<TP, T>(String, Type, Expression<Func<TP, Int32, T>>)
Declaration
protected void SetField<TP, T>(string dataTypeName, Type fieldType, Expression<Func<TP, int, T>> expr)
Parameters
Type |
Name |
Description |
System.String |
dataTypeName |
|
Type |
fieldType |
|
Expression<Func<TP, System.Int32, T>> |
expr |
|
Type Parameters
|
Improve this Doc
View Source
SetParameter(DataConnection, DbParameter, String, DbDataType, Nullable<Object>)
Declaration
public virtual void SetParameter(DataConnection dataConnection, DbParameter parameter, string name, DbDataType dataType, object? value)
Parameters
Type |
Name |
Description |
DataConnection |
dataConnection |
|
DbParameter |
parameter |
|
System.String |
name |
|
DbDataType |
dataType |
|
System.Nullable<System.Object> |
value |
|
|
Improve this Doc
View Source
SetParameterType(DataConnection, DbParameter, DbDataType)
Declaration
protected virtual void SetParameterType(DataConnection dataConnection, DbParameter parameter, DbDataType dataType)
Parameters
|
Improve this Doc
View Source
SetProviderField<TP, T>(Expression<Func<TP, Int32, T>>)
Declaration
protected void SetProviderField<TP, T>(Expression<Func<TP, int, T>> expr)
Parameters
Type |
Name |
Description |
Expression<Func<TP, System.Int32, T>> |
expr |
|
Type Parameters
|
Improve this Doc
View Source
SetProviderField<TP, T, TS>(Expression<Func<TP, Int32, T>>)
Declaration
protected void SetProviderField<TP, T, TS>(Expression<Func<TP, int, T>> expr)
Parameters
Type |
Name |
Description |
Expression<Func<TP, System.Int32, T>> |
expr |
|
Type Parameters
|
Improve this Doc
View Source
SetToType<TP, T, TF>(Expression<Func<TP, Int32, T>>)
Declaration
protected void SetToType<TP, T, TF>(Expression<Func<TP, int, T>> expr)
Parameters
Type |
Name |
Description |
Expression<Func<TP, System.Int32, T>> |
expr |
|
Type Parameters
|
Improve this Doc
View Source
SetToType<TP, T, TF>(String, Expression<Func<TP, Int32, T>>)
Declaration
protected void SetToType<TP, T, TF>(string dataTypeName, Expression<Func<TP, int, T>> expr)
Parameters
Type |
Name |
Description |
System.String |
dataTypeName |
|
Expression<Func<TP, System.Int32, T>> |
expr |
|
Type Parameters
Implements
Extension Methods