Class PostgreSQLOptions
- Namespace
- LinqToDB.DataProvider.PostgreSQL
- Assembly
- linq2db.dll
public sealed record PostgreSQLOptions : DataProviderOptions<PostgreSQLOptions>, IOptionSet, IConfigurationID, IEquatable<DataProviderOptions<PostgreSQLOptions>>, IEquatable<PostgreSQLOptions>
- Inheritance
-
PostgreSQLOptions
- Implements
- Inherited Members
- Extension Methods
Constructors
PostgreSQLOptions()
public PostgreSQLOptions()
PostgreSQLOptions(BulkCopyType, bool, PostgreSQLIdentifierQuoteMode)
public PostgreSQLOptions(BulkCopyType BulkCopyType = BulkCopyType.MultipleRows, bool NormalizeTimestampData = true, PostgreSQLIdentifierQuoteMode IdentifierQuoteMode = PostgreSQLIdentifierQuoteMode.Auto)
Parameters
BulkCopyType
BulkCopyTypeDefault bulk copy mode, used for PostgreSQL by BulkCopy<T>(DataConnection, IEnumerable<T>) methods, if mode is not specified explicitly. Default value: MultipleRows.
NormalizeTimestampData
boolEnables normalization of DateTime and DateTimeOffset data, passed to query as parameter or passed to BulkCopy<T>(ITable<T>, IEnumerable<T>) APIs, to comform with Npgsql 6 requerements:
- convert DateTimeOffset value to UTC value with zero Offset
- Use Utc for DateTime timestamptz values
- Use Unspecified for DateTime timestamp values with Utc kind
true
.IdentifierQuoteMode
PostgreSQLIdentifierQuoteModeSpecify identifiers quotation logic for SQL generation. Default value: Auto.
Properties
EqualityContract
protected override Type EqualityContract { get; }
Property Value
IdentifierQuoteMode
Specify identifiers quotation logic for SQL generation. Default value: Auto.
public PostgreSQLIdentifierQuoteMode IdentifierQuoteMode { get; init; }
Property Value
NormalizeTimestampData
Enables normalization of DateTime and DateTimeOffset data, passed to query as parameter or passed to BulkCopy<T>(ITable<T>, IEnumerable<T>) APIs, to comform with Npgsql 6 requerements:
- convert DateTimeOffset value to UTC value with zero Offset
- Use Utc for DateTime timestamptz values
- Use Unspecified for DateTime timestamp values with Utc kind
true
.
public bool NormalizeTimestampData { get; init; }
Property Value
Methods
CreateID(IdentifierBuilder)
protected override IdentifierBuilder CreateID(IdentifierBuilder builder)
Parameters
builder
IdentifierBuilder
Returns
Deconstruct(out BulkCopyType, out bool, out PostgreSQLIdentifierQuoteMode)
public void Deconstruct(out BulkCopyType BulkCopyType, out bool NormalizeTimestampData, out PostgreSQLIdentifierQuoteMode IdentifierQuoteMode)
Parameters
BulkCopyType
BulkCopyTypeNormalizeTimestampData
boolIdentifierQuoteMode
PostgreSQLIdentifierQuoteMode
Equals(DataProviderOptions<PostgreSQLOptions>?)
public override sealed bool Equals(DataProviderOptions<PostgreSQLOptions>? other)
Parameters
Returns
Equals(PostgreSQLOptions?)
public bool Equals(PostgreSQLOptions? other)
Parameters
other
PostgreSQLOptions
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builder
StringBuilder
Returns
ToString()
public override string ToString()
Returns
<Clone>$()
public override DataProviderOptions<PostgreSQLOptions> <Clone>$()
Returns
Operators
operator ==(PostgreSQLOptions?, PostgreSQLOptions?)
public static bool operator ==(PostgreSQLOptions? left, PostgreSQLOptions? right)
Parameters
left
PostgreSQLOptionsright
PostgreSQLOptions
Returns
operator !=(PostgreSQLOptions?, PostgreSQLOptions?)
public static bool operator !=(PostgreSQLOptions? left, PostgreSQLOptions? right)
Parameters
left
PostgreSQLOptionsright
PostgreSQLOptions