Class BulkCopyOptions
Inheritance
System.Object
BulkCopyOptions
Assembly: linq2db.dll
Syntax
public sealed class BulkCopyOptions : object, IOptionSet, IConfigurationID
Constructors
|
Improve this Doc
View Source
BulkCopyOptions()
Declaration
|
Improve this Doc
View Source
BulkCopyOptions(Nullable<Int32>, Nullable<Int32>, BulkCopyType, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<String>, Nullable<String>, Nullable<String>, Nullable<String>, TableOptions, Int32, Nullable<Action<BulkCopyRowsCopied>>, Boolean, Nullable<Int32>, Nullable<Int32>, Boolean)
Declaration
public BulkCopyOptions(int? MaxBatchSize = null, int? BulkCopyTimeout = null, BulkCopyType BulkCopyType = (BulkCopyType)0, bool? CheckConstraints = null, bool? KeepIdentity = null, bool? TableLock = null, bool? KeepNulls = null, bool? FireTriggers = null, bool? UseInternalTransaction = null, string? ServerName = null, string? DatabaseName = null, string? SchemaName = null, string? TableName = null, TableOptions TableOptions = (TableOptions)0, int NotifyAfter = null, Action<BulkCopyRowsCopied>? RowsCopiedCallback = null, bool UseParameters = null, int? MaxParametersForBatch = null, int? MaxDegreeOfParallelism = null, bool WithoutSession = null)
Parameters
Type |
Name |
Description |
System.Nullable<System.Int32> |
MaxBatchSize |
Number of rows in each batch. At the end of each batch, the rows in the batch are sent to the server.
Returns an integer value or zero if no value has been set.
|
System.Nullable<System.Int32> |
BulkCopyTimeout |
Number of seconds for the operation to complete before it times out.
|
BulkCopyType |
BulkCopyType |
Default bulk copy mode, used by BulkCopy<T>(DataConnection, IEnumerable<T>)
methods, if mode is not specified explicitly.
|
System.Nullable<System.Boolean> |
CheckConstraints |
Enables database constrains enforcement during bulk copy operation.
Supported with ProviderSpecific bulk copy mode for following databases:
- Oracle
- SQL Server
- SAP/Sybase ASE
|
System.Nullable<System.Boolean> |
KeepIdentity |
If this option set to true, bulk copy will use values of columns, marked with IsIdentity flag.
SkipOnInsert flag in this case will be ignored.
Otherwise those columns will be skipped and values will be generated by server.
Not compatible with RowByRow mode.
|
System.Nullable<System.Boolean> |
TableLock |
Applies table lock during bulk copy operation.
Supported with ProviderSpecific bulk copy mode for following databases:
- DB2
- Informix (using DB2 provider)
- SQL Server
- SAP/Sybase ASE
|
System.Nullable<System.Boolean> |
KeepNulls |
Enables instert of NULL values instead of values from colum default constraint during bulk copy operation.
Supported with ProviderSpecific bulk copy mode for following databases:
|
System.Nullable<System.Boolean> |
FireTriggers |
Enables insert triggers during bulk copy operation.
Supported with ProviderSpecific bulk copy mode for following databases:
- Oracle
- SQL Server
- SAP/Sybase ASE
|
System.Nullable<System.Boolean> |
UseInternalTransaction |
Enables automatic transaction creation during bulk copy operation.
Supported with ProviderSpecific bulk copy mode for following databases:
- Oracle
- SQL Server
- SAP/Sybase ASE
|
System.Nullable<System.String> |
ServerName |
Gets or sets explicit name of target server instead of one, configured for copied entity in mapping schema.
See method for support information per provider.
Also note that it is not supported by provider-specific insert method.
|
System.Nullable<System.String> |
DatabaseName |
Gets or sets explicit name of target database instead of one, configured for copied entity in mapping schema.
See method for support information per provider.
|
System.Nullable<System.String> |
SchemaName |
Gets or sets explicit name of target schema/owner instead of one, configured for copied entity in mapping schema.
See method for support information per provider.
|
System.Nullable<System.String> |
TableName |
Gets or sets explicit name of target table instead of one, configured for copied entity in mapping schema.
|
TableOptions |
TableOptions |
Gets or sets TableOptions flags overrides instead of configured for copied entity in mapping schema.
See IsTemporary<T>(ITable<T>, Boolean) method for support information per provider.
|
System.Int32 |
NotifyAfter |
Gets or sets counter after how many copied records RowsCopiedCallback should be called.
E.g. if you set it to 10, callback will be called after each 10 copied records.
To disable callback, set this option to 0 (default value).
|
System.Nullable<Action<BulkCopyRowsCopied>> |
RowsCopiedCallback |
Gets or sets callback method that will be called by BulkCopy operation after each NotifyAfter rows copied.
This callback will not be used if NotifyAfter set to 0.
|
System.Boolean |
UseParameters |
Gets or sets whether to Always use Parameters for MultipleRowsCopy. Default is false.
If True, provider's override for MaxParameters will be used to determine the maximum number of rows per insert,
Unless overridden by MaxParametersForBatch.
|
System.Nullable<System.Int32> |
MaxParametersForBatch |
If set, will override the Maximum parameters per batch statement from MaxParameters.
|
System.Nullable<System.Int32> |
MaxDegreeOfParallelism |
Implemented only by ClickHouse.Client provider. Defines number of connections, used for parallel insert in ProviderSpecific mode.
|
System.Boolean |
WithoutSession |
Implemented only by ClickHouse.Client provider. When set, provider-specific bulk copy will use session-less connection even if called over connection with session.
Note that session-less connections cannot be used with session-bound functionality like temporary tables.
|
Fields
|
Improve this Doc
View Source
Empty
Declaration
public static readonly BulkCopyOptions Empty
Field Value
Properties
|
Improve this Doc
View Source
BulkCopyTimeout
Declaration
public int? BulkCopyTimeout { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
|
Improve this Doc
View Source
BulkCopyType
Declaration
public BulkCopyType BulkCopyType { get; set; }
Property Value
|
Improve this Doc
View Source
CheckConstraints
Declaration
public bool? CheckConstraints { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
|
Improve this Doc
View Source
DatabaseName
Declaration
public string? DatabaseName { get; set; }
Property Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
FireTriggers
Declaration
public bool? FireTriggers { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
|
Improve this Doc
View Source
KeepIdentity
Declaration
public bool? KeepIdentity { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
|
Improve this Doc
View Source
KeepNulls
Declaration
public bool? KeepNulls { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
|
Improve this Doc
View Source
MaxBatchSize
Declaration
public int? MaxBatchSize { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
|
Improve this Doc
View Source
MaxDegreeOfParallelism
Declaration
public int? MaxDegreeOfParallelism { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
|
Improve this Doc
View Source
MaxParametersForBatch
Declaration
public int? MaxParametersForBatch { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
|
Improve this Doc
View Source
NotifyAfter
Declaration
public int NotifyAfter { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
|
Improve this Doc
View Source
RowsCopiedCallback
Declaration
public Action<BulkCopyRowsCopied>? RowsCopiedCallback { get; set; }
Property Value
|
Improve this Doc
View Source
SchemaName
Declaration
public string? SchemaName { get; set; }
Property Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
ServerName
Declaration
public string? ServerName { get; set; }
Property Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
TableLock
Declaration
public bool? TableLock { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
|
Improve this Doc
View Source
TableName
Declaration
public string? TableName { get; set; }
Property Value
Type |
Description |
System.Nullable<System.String> |
|
|
Improve this Doc
View Source
TableOptions
Declaration
public TableOptions TableOptions { get; set; }
Property Value
|
Improve this Doc
View Source
UseInternalTransaction
Declaration
public bool? UseInternalTransaction { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Boolean> |
|
|
Improve this Doc
View Source
UseParameters
Declaration
public bool UseParameters { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
WithoutSession
Declaration
public bool WithoutSession { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
|
Improve this Doc
View Source
Equals(BulkCopyOptions)
Declaration
public bool Equals(BulkCopyOptions other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IConfigurationID.ConfigurationID
Declaration
int IConfigurationID.ConfigurationID { get; }
Returns
Type |
Description |
System.Int32 |
|
Implements
System.IEquatable<>
Extension Methods