Table of Contents

Class MySqlHelpers

Namespace
LfrlAnvil.MySql.Internal
Assembly
LfrlAnvil.MySql.dll

Contains various MySQL helpers.

public static class MySqlHelpers
Inheritance
MySqlHelpers
Inherited Members

Fields

DateFormatQuoted

public const string DateFormatQuoted = "DATE\\'yyyy-MM-dd\\'"

Field Value

string

DefaultIndexPrefixLength

public const int DefaultIndexPrefixLength = 500

Field Value

int

DefaultUpdateSourceAlias

public const string DefaultUpdateSourceAlias = "new"

Field Value

string

DefaultVersionHistoryName

Default version history table name.

public static readonly SqlSchemaObjectName DefaultVersionHistoryName

Field Value

SqlSchemaObjectName

DropIndexIfExistsProcedureName

public const string DropIndexIfExistsProcedureName = "_DROP_INDEX_IF_EXISTS"

Field Value

string

GuidFunctionName

public const string GuidFunctionName = "GUID"

Field Value

string

TimeFormatQuoted

public const string TimeFormatQuoted = "TI\\ME\\'HH:mm:ss.ffffff\\'"

Field Value

string

Methods

ExtendConnectionString(ReadOnlyArray<SqlConnectionStringEntry>, string)

Extends the provided collection of SqlConnectionStringEntry instances with a partial connection string, potentially overriding entries with their IsMutable equal to true.

[Pure]
public static string ExtendConnectionString(ReadOnlyArray<SqlConnectionStringEntry> entries, string options)

Parameters

entries ReadOnlyArray<SqlConnectionStringEntry>

Connection string entries to extend.

options string

Connection string options to apply to the extended collection.

Returns

string

New connection string.

ExtractConnectionStringEntries(MySqlConnectionStringBuilder)

Extracts a collection of SqlConnectionStringEntry instances from the provided MySqlConnector.MySqlConnectionStringBuilder.

[Pure]
public static SqlConnectionStringEntry[] ExtractConnectionStringEntries(MySqlConnectionStringBuilder builder)

Parameters

builder MySqlConnectionStringBuilder

Source connection string builder.

Returns

SqlConnectionStringEntry[]

New collection of SqlConnectionStringEntry instances.

GetUpdateSourceAlias(MySqlNodeInterpreterOptions)

Returns an alias of a value source of UPSERT statements.

[Pure]
public static string GetUpdateSourceAlias(MySqlNodeInterpreterOptions options)

Parameters

options MySqlNodeInterpreterOptions

MySqlNodeInterpreterOptions instance to use as base.

Returns

string

Alias of a value source of UPSERT statements.

Remarks

See UpsertSourceAlias for more information.

IsMutableConnectionStringKey(string)

Specifies whether or not the provided key of a connection string entry is considered to be mutable.

[Pure]
public static bool IsMutableConnectionStringKey(string key)

Parameters

key string

Key to check.

Returns

bool

true when key is mutable, otherwise false.

Remarks

Mutable connection string entries can be changed in the ExtendConnectionString(ReadOnlyArray<SqlConnectionStringEntry>, string) method invocation.