Table of Contents

Class BasicBulkCopy

Namespace
LinqToDB.DataProvider
Assembly
linq2db.dll
public class BasicBulkCopy
Inheritance
BasicBulkCopy
Extension Methods

Properties

CastAllRowsParametersOnUnionAll

protected virtual bool CastAllRowsParametersOnUnionAll { get; }

Property Value

bool

CastFirstRowLiteralOnUnionAll

protected virtual bool CastFirstRowLiteralOnUnionAll { get; }

Property Value

bool

CastFirstRowParametersOnUnionAll

protected virtual bool CastFirstRowParametersOnUnionAll { get; }

Property Value

bool

MaxParameters

protected virtual int MaxParameters { get; }

Property Value

int

MaxSqlLength

protected virtual int MaxSqlLength { get; }

Property Value

int

Methods

BulkCopyAsync<T>(BulkCopyType, ITable<T>, DataOptions, IEnumerable<T>, CancellationToken)

public virtual Task<BulkCopyRowsCopied> BulkCopyAsync<T>(BulkCopyType bulkCopyType, ITable<T> table, DataOptions options, IEnumerable<T> source, CancellationToken cancellationToken) where T : notnull

Parameters

bulkCopyType BulkCopyType
table ITable<T>
options DataOptions
source IEnumerable<T>
cancellationToken CancellationToken

Returns

Task<BulkCopyRowsCopied>

Type Parameters

T

BulkCopy<T>(BulkCopyType, ITable<T>, DataOptions, IEnumerable<T>)

public virtual BulkCopyRowsCopied BulkCopy<T>(BulkCopyType bulkCopyType, ITable<T> table, DataOptions options, IEnumerable<T> source) where T : notnull

Parameters

bulkCopyType BulkCopyType
table ITable<T>
options DataOptions
source IEnumerable<T>

Returns

BulkCopyRowsCopied

Type Parameters

T

CastLiteral(ColumnDescriptor)

protected virtual bool CastLiteral(ColumnDescriptor column)

Parameters

column ColumnDescriptor

Returns

bool

GetTableName<T>(ISqlBuilder, BulkCopyOptions, ITable<T>, bool)

protected static string GetTableName<T>(ISqlBuilder sqlBuilder, BulkCopyOptions options, ITable<T> table, bool escaped = true) where T : notnull

Parameters

sqlBuilder ISqlBuilder
options BulkCopyOptions
table ITable<T>
escaped bool

Returns

string

Type Parameters

T

MultipleRowsCopy1(MultipleRowsHelper, IEnumerable)

protected BulkCopyRowsCopied MultipleRowsCopy1(MultipleRowsHelper helper, IEnumerable source)

Parameters

helper MultipleRowsHelper
source IEnumerable

Returns

BulkCopyRowsCopied

MultipleRowsCopy1Async(MultipleRowsHelper, IEnumerable, CancellationToken)

protected Task<BulkCopyRowsCopied> MultipleRowsCopy1Async(MultipleRowsHelper helper, IEnumerable source, CancellationToken cancellationToken)

Parameters

helper MultipleRowsHelper
source IEnumerable
cancellationToken CancellationToken

Returns

Task<BulkCopyRowsCopied>

MultipleRowsCopy1Async<T>(ITable<T>, DataOptions, IEnumerable<T>, CancellationToken)

protected Task<BulkCopyRowsCopied> MultipleRowsCopy1Async<T>(ITable<T> table, DataOptions options, IEnumerable<T> source, CancellationToken cancellationToken) where T : notnull

Parameters

table ITable<T>
options DataOptions
source IEnumerable<T>
cancellationToken CancellationToken

Returns

Task<BulkCopyRowsCopied>

Type Parameters

T

MultipleRowsCopy1<T>(ITable<T>, DataOptions, IEnumerable<T>)

protected BulkCopyRowsCopied MultipleRowsCopy1<T>(ITable<T> table, DataOptions options, IEnumerable<T> source) where T : notnull

Parameters

table ITable<T>
options DataOptions
source IEnumerable<T>

Returns

BulkCopyRowsCopied

Type Parameters

T

MultipleRowsCopy2(MultipleRowsHelper, IEnumerable, string)

protected BulkCopyRowsCopied MultipleRowsCopy2(MultipleRowsHelper helper, IEnumerable source, string from)

Parameters

helper MultipleRowsHelper
source IEnumerable
from string

Returns

BulkCopyRowsCopied

MultipleRowsCopy2Async(MultipleRowsHelper, IEnumerable, string, CancellationToken)

protected Task<BulkCopyRowsCopied> MultipleRowsCopy2Async(MultipleRowsHelper helper, IEnumerable source, string from, CancellationToken cancellationToken)

Parameters

helper MultipleRowsHelper
source IEnumerable
from string
cancellationToken CancellationToken

Returns

Task<BulkCopyRowsCopied>

MultipleRowsCopy2Async<T>(ITable<T>, DataOptions, IEnumerable<T>, string, CancellationToken)

protected Task<BulkCopyRowsCopied> MultipleRowsCopy2Async<T>(ITable<T> table, DataOptions options, IEnumerable<T> source, string from, CancellationToken cancellationToken) where T : notnull

Parameters

table ITable<T>
options DataOptions
source IEnumerable<T>
from string
cancellationToken CancellationToken

Returns

Task<BulkCopyRowsCopied>

Type Parameters

T

MultipleRowsCopy2<T>(ITable<T>, DataOptions, IEnumerable<T>, string)

protected BulkCopyRowsCopied MultipleRowsCopy2<T>(ITable<T> table, DataOptions options, IEnumerable<T> source, string from) where T : notnull

Parameters

table ITable<T>
options DataOptions
source IEnumerable<T>
from string

Returns

BulkCopyRowsCopied

Type Parameters

T

MultipleRowsCopy3(MultipleRowsHelper, BulkCopyOptions, IEnumerable, string)

protected BulkCopyRowsCopied MultipleRowsCopy3(MultipleRowsHelper helper, BulkCopyOptions options, IEnumerable source, string from)

Parameters

helper MultipleRowsHelper
options BulkCopyOptions
source IEnumerable
from string

Returns

BulkCopyRowsCopied

MultipleRowsCopy3Async(MultipleRowsHelper, BulkCopyOptions, IEnumerable, string, CancellationToken)

protected Task<BulkCopyRowsCopied> MultipleRowsCopy3Async(MultipleRowsHelper helper, BulkCopyOptions options, IEnumerable source, string from, CancellationToken cancellationToken)

Parameters

helper MultipleRowsHelper
options BulkCopyOptions
source IEnumerable
from string
cancellationToken CancellationToken

Returns

Task<BulkCopyRowsCopied>

MultipleRowsCopyAsync<T>(ITable<T>, DataOptions, IEnumerable<T>, CancellationToken)

protected virtual Task<BulkCopyRowsCopied> MultipleRowsCopyAsync<T>(ITable<T> table, DataOptions options, IEnumerable<T> source, CancellationToken cancellationToken) where T : notnull

Parameters

table ITable<T>
options DataOptions
source IEnumerable<T>
cancellationToken CancellationToken

Returns

Task<BulkCopyRowsCopied>

Type Parameters

T

MultipleRowsCopyHelper(MultipleRowsHelper, IEnumerable, string?, Action<MultipleRowsHelper>, Action<MultipleRowsHelper, object, string?>, Action<MultipleRowsHelper>, int, int)

protected static BulkCopyRowsCopied MultipleRowsCopyHelper(MultipleRowsHelper helper, IEnumerable source, string? from, Action<MultipleRowsHelper> prepFunction, Action<MultipleRowsHelper, object, string?> addFunction, Action<MultipleRowsHelper> finishFunction, int maxParameters, int maxSqlLength)

Parameters

helper MultipleRowsHelper
source IEnumerable
from string
prepFunction Action<MultipleRowsHelper>
addFunction Action<MultipleRowsHelper, object, string>
finishFunction Action<MultipleRowsHelper>
maxParameters int
maxSqlLength int

Returns

BulkCopyRowsCopied

MultipleRowsCopyHelperAsync(MultipleRowsHelper, IEnumerable, string?, Action<MultipleRowsHelper>, Action<MultipleRowsHelper, object, string?>, Action<MultipleRowsHelper>, CancellationToken, int, int)

protected static Task<BulkCopyRowsCopied> MultipleRowsCopyHelperAsync(MultipleRowsHelper helper, IEnumerable source, string? from, Action<MultipleRowsHelper> prepFunction, Action<MultipleRowsHelper, object, string?> addFunction, Action<MultipleRowsHelper> finishFunction, CancellationToken cancellationToken, int maxParameters, int maxSqlLength)

Parameters

helper MultipleRowsHelper
source IEnumerable
from string
prepFunction Action<MultipleRowsHelper>
addFunction Action<MultipleRowsHelper, object, string>
finishFunction Action<MultipleRowsHelper>
cancellationToken CancellationToken
maxParameters int
maxSqlLength int

Returns

Task<BulkCopyRowsCopied>

MultipleRowsCopy<T>(ITable<T>, DataOptions, IEnumerable<T>)

protected virtual BulkCopyRowsCopied MultipleRowsCopy<T>(ITable<T> table, DataOptions options, IEnumerable<T> source) where T : notnull

Parameters

table ITable<T>
options DataOptions
source IEnumerable<T>

Returns

BulkCopyRowsCopied

Type Parameters

T

ProviderSpecificCopyAsync<T>(ITable<T>, DataOptions, IEnumerable<T>, CancellationToken)

protected virtual Task<BulkCopyRowsCopied> ProviderSpecificCopyAsync<T>(ITable<T> table, DataOptions options, IEnumerable<T> source, CancellationToken cancellationToken) where T : notnull

Parameters

table ITable<T>
options DataOptions
source IEnumerable<T>
cancellationToken CancellationToken

Returns

Task<BulkCopyRowsCopied>

Type Parameters

T

ProviderSpecificCopy<T>(ITable<T>, DataOptions, IEnumerable<T>)

protected virtual BulkCopyRowsCopied ProviderSpecificCopy<T>(ITable<T> table, DataOptions options, IEnumerable<T> source) where T : notnull

Parameters

table ITable<T>
options DataOptions
source IEnumerable<T>

Returns

BulkCopyRowsCopied

Type Parameters

T

RowByRowCopyAsync<T>(ITable<T>, DataOptions, IEnumerable<T>, CancellationToken)

protected virtual Task<BulkCopyRowsCopied> RowByRowCopyAsync<T>(ITable<T> table, DataOptions dataOptions, IEnumerable<T> source, CancellationToken cancellationToken) where T : notnull

Parameters

table ITable<T>
dataOptions DataOptions
source IEnumerable<T>
cancellationToken CancellationToken

Returns

Task<BulkCopyRowsCopied>

Type Parameters

T

RowByRowCopy<T>(ITable<T>, DataOptions, IEnumerable<T>)

protected virtual BulkCopyRowsCopied RowByRowCopy<T>(ITable<T> table, DataOptions dataOptions, IEnumerable<T> source) where T : notnull

Parameters

table ITable<T>
dataOptions DataOptions
source IEnumerable<T>

Returns

BulkCopyRowsCopied

Type Parameters

T

TraceAction(DataConnection, Func<string>, Func<int>)

protected void TraceAction(DataConnection dataConnection, Func<string> commandText, Func<int> action)

Parameters

dataConnection DataConnection
commandText Func<string>
action Func<int>

TraceActionAsync(DataConnection, Func<string>, Func<Task<int>>)

protected Task TraceActionAsync(DataConnection dataConnection, Func<string> commandText, Func<Task<int>> action)

Parameters

dataConnection DataConnection
commandText Func<string>
action Func<Task<int>>

Returns

Task