Table of Contents

Class PostgreSQLHints

Namespace
LinqToDB.DataProvider.PostgreSQL
Assembly
linq2db.dll
public static class PostgreSQLHints
Inheritance
PostgreSQLHints

Fields

ForKeyShare

public const string ForKeyShare = "FOR KEY SHARE"

Field Value

string

ForNoKeyUpdate

public const string ForNoKeyUpdate = "FOR NO KEY UPDATE"

Field Value

string

ForShare

public const string ForShare = "FOR SHARE"

Field Value

string

ForUpdate

public const string ForUpdate = "FOR UPDATE"

Field Value

string

NoWait

public const string NoWait = "NOWAIT"

Field Value

string

SkipLocked

public const string SkipLocked = "SKIP LOCKED"

Field Value

string

Methods

ForKeyShareHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForKeyShareHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForKeyShareHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForKeyShareNoWaitHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForKeyShareNoWaitHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForKeyShareNoWaitHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForKeyShareSkipLockedHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForKeyShareSkipLockedHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForKeyShareSkipLockedHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForNoKeyUpdateHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForNoKeyUpdateHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForNoKeyUpdateHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForNoKeyUpdateNoWaitHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForNoKeyUpdateNoWaitHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForNoKeyUpdateNoWaitHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForNoKeyUpdateSkipLockedHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForNoKeyUpdateSkipLockedHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForNoKeyUpdateSkipLockedHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForShareHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForShareHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForShareHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForShareNoWaitHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForShareNoWaitHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForShareNoWaitHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForShareSkipLockedHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForShareSkipLockedHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForShareSkipLockedHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForUpdateHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForUpdateHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForUpdateHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForUpdateNoWaitHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForUpdateNoWaitHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForUpdateNoWaitHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

ForUpdateSkipLockedHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, params SqlID[])

[ExpressionMethod("ForUpdateSkipLockedHintImpl")]
public static IPostgreSQLSpecificQueryable<TSource> ForUpdateSkipLockedHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> query, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

query IPostgreSQLSpecificQueryable<TSource>
tableIDs SqlID[]

Returns

IPostgreSQLSpecificQueryable<TSource>

Type Parameters

TSource

SubQueryTableHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, string, params SqlID[])

Adds join hint to a generated query.

// will produce following SQL code in generated query: INNER LOOP JOIN
var tableWithHint = db.Table.JoinHint("LOOP");
[Sql.QueryExtension("PostgreSQL", Sql.QueryExtensionScope.SubQueryHint, typeof(PostgreSQLHints.SubQueryTableHintExtensionBuilder))]
[Sql.QueryExtension(null, Sql.QueryExtensionScope.None, typeof(NoneExtensionBuilder))]
public static IPostgreSQLSpecificQueryable<TSource> SubQueryTableHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> source, string hint, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

source IPostgreSQLSpecificQueryable<TSource>

Query source.

hint string

SQL text, added to join in generated query.

tableIDs SqlID[]

Table IDs.

Returns

IPostgreSQLSpecificQueryable<TSource>

Query source with join hints.

Type Parameters

TSource

Table record mapping class.

SubQueryTableHint<TSource>(IPostgreSQLSpecificQueryable<TSource>, string, string, params SqlID[])

Adds join hint to a generated query.

// will produce following SQL code in generated query: INNER LOOP JOIN
var tableWithHint = db.Table.JoinHint("LOOP");
[Sql.QueryExtension("PostgreSQL", Sql.QueryExtensionScope.SubQueryHint, typeof(PostgreSQLHints.SubQueryTableHintExtensionBuilder))]
[Sql.QueryExtension(null, Sql.QueryExtensionScope.None, typeof(NoneExtensionBuilder))]
public static IPostgreSQLSpecificQueryable<TSource> SubQueryTableHint<TSource>(this IPostgreSQLSpecificQueryable<TSource> source, string hint, string hint2, params Sql.SqlID[] tableIDs) where TSource : notnull

Parameters

source IPostgreSQLSpecificQueryable<TSource>

Query source.

hint string

SQL text, added to join in generated query.

hint2 string

NOWAIT | SKIP LOCKED

tableIDs SqlID[]

Table IDs.

Returns

IPostgreSQLSpecificQueryable<TSource>

Query source with join hints.

Type Parameters

TSource

Table record mapping class.