/
MySqlOptions.cs
51 lines (42 loc) · 1.28 KB
/
MySqlOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
namespace LinqToDB.DataProvider.MySql
{
using Common;
using Common.Internal;
using Data;
/// <param name="BulkCopyType">
/// Default bulk copy mode, used for MySql by <see cref="DataConnectionExtensions.BulkCopy{T}(DataConnection, IEnumerable{T})"/>
/// methods, if mode is not specified explicitly.
/// Default value: <see cref="BulkCopyType.MultipleRows"/>.
/// </param>
public sealed record MySqlOptions
(
BulkCopyType BulkCopyType = BulkCopyType.MultipleRows
// If you add another parameter here, don't forget to update
// MySqlOptions copy constructor and CreateID method.
)
: DataProviderOptions<MySqlOptions>(BulkCopyType)
{
public MySqlOptions() : this(BulkCopyType.MultipleRows)
{
}
MySqlOptions(MySqlOptions original) : base(original)
{
}
protected override IdentifierBuilder CreateID(IdentifierBuilder builder) => builder
;
#region IEquatable implementation
public bool Equals(MySqlOptions? other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return ((IOptionSet)this).ConfigurationID == ((IOptionSet)other).ConfigurationID;
}
public override int GetHashCode()
{
return ((IOptionSet)this).ConfigurationID;
}
#endregion
}
}