Table of Contents

Class NpgsqlQuerySqlGenerator

Namespace
Npgsql.EntityFrameworkCore.PostgreSQL.Query.Internal
Assembly
Npgsql.EntityFrameworkCore.PostgreSQL.dll

The default query SQL generator for Npgsql.

public class NpgsqlQuerySqlGenerator : QuerySqlGenerator
Inheritance
NpgsqlQuerySqlGenerator
Inherited Members

Constructors

NpgsqlQuerySqlGenerator(QuerySqlGeneratorDependencies, IRelationalTypeMappingSource, bool, Version)

public NpgsqlQuerySqlGenerator(QuerySqlGeneratorDependencies dependencies, IRelationalTypeMappingSource typeMappingSource, bool reverseNullOrderingEnabled, Version postgresVersion)

Parameters

dependencies QuerySqlGeneratorDependencies
typeMappingSource IRelationalTypeMappingSource
reverseNullOrderingEnabled bool
postgresVersion Version

Methods

GenerateLimitOffset(SelectExpression)

Generates SQL for the LIMIT/OFFSET clauses of the given SELECT expression.

protected override void GenerateLimitOffset(SelectExpression selectExpression)

Parameters

selectExpression SelectExpression

The SelectExpression for whose LIMIT/OFFSET clauses to generate SQL.

GenerateRootCommand(Expression)

Generates the command for the given top-level query expression. This allows providers to intercept if an expression requires different processing when it is at top-level.

protected override void GenerateRootCommand(Expression queryExpression)

Parameters

queryExpression Expression

A query expression to print in command.

GenerateSetOperation(SetOperationBase)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override void GenerateSetOperation(SetOperationBase setOperation)

Parameters

setOperation SetOperationBase

GenerateSetOperationOperand(SetOperationBase, SelectExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override void GenerateSetOperationOperand(SetOperationBase setOperation, SelectExpression operand)

Parameters

setOperation SetOperationBase
operand SelectExpression

GenerateTop(SelectExpression)

Generates SQL for the TOP clause of the given SELECT expression.

protected override void GenerateTop(SelectExpression selectExpression)

Parameters

selectExpression SelectExpression

The SelectExpression for whose TOP clause to generate SQL.

GenerateValues(ValuesExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override void GenerateValues(ValuesExpression valuesExpression)

Parameters

valuesExpression ValuesExpression

GetOperator(SqlBinaryExpression)

Gets the SQL operator for a SQL binary operation.

protected override string GetOperator(SqlBinaryExpression e)

Parameters

e SqlBinaryExpression

Returns

string

A string representation of the binary operator.

RequiresParentheses(SqlExpression, SqlExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override bool RequiresParentheses(SqlExpression outerExpression, SqlExpression innerExpression)

Parameters

outerExpression SqlExpression
innerExpression SqlExpression

Returns

bool

TryGenerateWithoutWrappingSelect(SelectExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override bool TryGenerateWithoutWrappingSelect(SelectExpression selectExpression)

Parameters

selectExpression SelectExpression

Returns

bool

TryGetOperatorInfo(SqlExpression, out int, out bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override bool TryGetOperatorInfo(SqlExpression expression, out int precedence, out bool isAssociative)

Parameters

expression SqlExpression
precedence int
isAssociative bool

Returns

bool

VisitArrayAll(PgAllExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Expression VisitArrayAll(PgAllExpression expression)

Parameters

expression PgAllExpression

Returns

Expression

VisitArrayAny(PgAnyExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Expression VisitArrayAny(PgAnyExpression expression)

Parameters

expression PgAnyExpression

Returns

Expression

VisitArrayIndex(SqlBinaryExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Expression VisitArrayIndex(SqlBinaryExpression expression)

Parameters

expression SqlBinaryExpression

Returns

Expression

VisitArrayIndex(PgArrayIndexExpression)

Produces SQL array index expression (e.g. arr[1]).

protected virtual Expression VisitArrayIndex(PgArrayIndexExpression expression)

Parameters

expression PgArrayIndexExpression

Returns

Expression

VisitArraySlice(PgArraySliceExpression)

Produces SQL array slice expression (e.g. arr[1:2]).

protected virtual Expression VisitArraySlice(PgArraySliceExpression expression)

Parameters

expression PgArraySliceExpression

Returns

Expression

VisitCollate(CollateExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override Expression VisitCollate(CollateExpression collateExpression)

Parameters

collateExpression CollateExpression

Returns

Expression

VisitCrossApply(CrossApplyExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override Expression VisitCrossApply(CrossApplyExpression crossApplyExpression)

Parameters

crossApplyExpression CrossApplyExpression

Returns

Expression

VisitDelete(DeleteExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override Expression VisitDelete(DeleteExpression deleteExpression)

Parameters

deleteExpression DeleteExpression

Returns

Expression

VisitExtension(Expression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override Expression VisitExtension(Expression extensionExpression)

Parameters

extensionExpression Expression

Returns

Expression

VisitILike(PgILikeExpression, bool)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Expression VisitILike(PgILikeExpression likeExpression, bool negated = false)

Parameters

likeExpression PgILikeExpression
negated bool

Returns

Expression

VisitJsonPathTraversal(PgJsonTraversalExpression)

Visits the children of an PgJsonTraversalExpression.

protected virtual Expression VisitJsonPathTraversal(PgJsonTraversalExpression expression)

Parameters

expression PgJsonTraversalExpression

The expression.

Returns

Expression

An Expression.

VisitJsonScalar(JsonScalarExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override Expression VisitJsonScalar(JsonScalarExpression jsonScalarExpression)

Parameters

jsonScalarExpression JsonScalarExpression

Returns

Expression

VisitNewArray(PgNewArrayExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Expression VisitNewArray(PgNewArrayExpression pgNewArrayExpression)

Parameters

pgNewArrayExpression PgNewArrayExpression

Returns

Expression

VisitOrdering(OrderingExpression)

Generates SQL for a single ordering in a SELECT ORDER BY clause.

protected override Expression VisitOrdering(OrderingExpression ordering)

Parameters

ordering OrderingExpression

Returns

Expression

VisitOuterApply(OuterApplyExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override Expression VisitOuterApply(OuterApplyExpression outerApplyExpression)

Parameters

outerApplyExpression OuterApplyExpression

Returns

Expression

VisitPgBinary(PgBinaryExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Expression VisitPgBinary(PgBinaryExpression binaryExpression)

Parameters

binaryExpression PgBinaryExpression

Returns

Expression

VisitPgDelete(PgDeleteExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Expression VisitPgDelete(PgDeleteExpression pgDeleteExpression)

Parameters

pgDeleteExpression PgDeleteExpression

Returns

Expression

VisitPgFunction(PgFunctionExpression)

Visits the children of a PgFunctionExpression.

protected virtual Expression VisitPgFunction(PgFunctionExpression e)

Parameters

e PgFunctionExpression

The expression.

Returns

Expression

An Expression.

VisitPgTableValuedFunctionExpression(PgTableValuedFunctionExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Expression VisitPgTableValuedFunctionExpression(PgTableValuedFunctionExpression tableValuedFunctionExpression)

Parameters

tableValuedFunctionExpression PgTableValuedFunctionExpression

Returns

Expression

VisitRegexMatch(PgRegexMatchExpression, bool)

Produces SQL for PostgreSQL regex matching.

protected virtual Expression VisitRegexMatch(PgRegexMatchExpression expression, bool negated = false)

Parameters

expression PgRegexMatchExpression
negated bool

Returns

Expression

Remarks

VisitRowValue(PgRowValueExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected virtual Expression VisitRowValue(PgRowValueExpression rowValueExpression)

Parameters

rowValueExpression PgRowValueExpression

Returns

Expression

VisitSqlBinary(SqlBinaryExpression)

Generates SQL for a binary expression.

protected override Expression VisitSqlBinary(SqlBinaryExpression binary)

Parameters

binary SqlBinaryExpression

Returns

Expression

VisitSqlUnary(SqlUnaryExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override Expression VisitSqlUnary(SqlUnaryExpression sqlUnaryExpression)

Parameters

sqlUnaryExpression SqlUnaryExpression

Returns

Expression

VisitUnknownBinary(PgUnknownBinaryExpression)

Visits the children of a PgUnknownBinaryExpression.

protected virtual Expression VisitUnknownBinary(PgUnknownBinaryExpression unknownBinaryExpression)

Parameters

unknownBinaryExpression PgUnknownBinaryExpression

The expression.

Returns

Expression

An Expression.

VisitUpdate(UpdateExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override Expression VisitUpdate(UpdateExpression updateExpression)

Parameters

updateExpression UpdateExpression

Returns

Expression

VisitValues(ValuesExpression)

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

protected override Expression VisitValues(ValuesExpression valuesExpression)

Parameters

valuesExpression ValuesExpression

Returns

Expression