Table of Contents

Class OracleBulkCopy

Namespace
LinqToDB.Internal.DataProvider.Oracle
Assembly
linq2db.dll
public class OracleBulkCopy : BasicBulkCopy
Inheritance
object
OracleBulkCopy
Inherited Members
Extension Methods

Constructors

OracleBulkCopy(OracleDataProvider, AlternativeBulkCopy)

public OracleBulkCopy(OracleDataProvider provider, AlternativeBulkCopy useAlternativeBulkCopy)

Parameters

provider OracleDataProvider
useAlternativeBulkCopy AlternativeBulkCopy

Properties

MaxParameters

protected override int MaxParameters { get; }

Property Value

int

Remarks

Settings based on https://www.jooq.org/doc/3.12/manual/sql-building/dsl-context/custom-settings/settings-inline-threshold/ We subtract 1 based on possibility of provider using parameter for command.

MaxSqlLength

protected override int MaxSqlLength { get; }

Property Value

int

Remarks

Oracle publishes no fixed maximum statement length. "Logical Database Limits" only says the limit "depends on many factors, including database configuration, disk space, and memory": https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/logical-database-limits.html The previous 65535 came from Oracle 8 documentation, which no longer applies to any supported version.

393,216 characters - 384 * 1024, counted in UTF-16 characters of the generated SQL rather than in bytes, the same unit as MaxSqlLengthForBatch - was chosen from measurement (2026-08, issue #5825): on Oracle 11 - the oldest supported version - and on Oracle 23, both INSERT ALL and INSERT ... SELECT FROM DUAL UNION ALL statements of inlined literals parsed and executed correctly up to 4M characters (8MB of bytes for a multi-byte payload under AL32UTF8). This value therefore keeps better than 10x headroom over what was verified, while staying in line with the other providers here and bounding the cost of a hard parse: the default Oracle path inlines literals, so every batch is a distinct statement that is parsed from scratch.

Users whose database and driver accept longer statements can raise it with MaxSqlLengthForBatch.

MultipleRowsConvertToParameter

protected override Func<DataOptions, DbDataType, object?, bool>? MultipleRowsConvertToParameter { get; }

Property Value

Func<DataOptions, DbDataType, object, bool>

Methods

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

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

Parameters

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

Returns

Task<BulkCopyRowsCopied>

Type Parameters

T

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

protected override 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

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

protected override 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, IAsyncEnumerable<T>, CancellationToken)

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

Parameters

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

Returns

Task<BulkCopyRowsCopied>

Type Parameters

T

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

protected override 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 override 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