QuerySqlGenerator Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A query SQL generator to get IRelationalCommand for given SelectExpression.
This type is typically used by database providers (and other extensions). It is generally not used in application code.
public class QuerySqlGenerator : Microsoft.EntityFrameworkCore.Query.SqlExpressionVisitor
type QuerySqlGenerator = class
inherit SqlExpressionVisitor
Public Class QuerySqlGenerator
Inherits SqlExpressionVisitor
- Inheritance
Constructors
QuerySqlGenerator(QuerySqlGeneratorDependencies) |
Creates a new instance of the QuerySqlGenerator class. |
Properties
AliasSeparator |
The default alias separator. |
Dependencies |
Relational provider-specific dependencies for this service. |
Sql |
The current SQL command builder. |
Methods
CheckComposableSql(String) |
Checks whether a given SQL string is composable, i.e. can be embedded as a subquery within a larger SQL query. |
CheckComposableSqlTrimmed(ReadOnlySpan<Char>) |
Checks whether a given SQL string is composable, i.e. can be embedded as a subquery within a
larger SQL query. The provided |
GenerateEmptyProjection(SelectExpression) |
Generates empty projection for a SelectExpression. |
GenerateExists(ExistsExpression, Boolean) |
Generates SQL for the EXISTS expression. |
GenerateIn(InExpression, Boolean) |
Generates SQL for the IN expression. |
GenerateLike(LikeExpression, Boolean) |
Generates SQL for the LIKE expression. |
GenerateLimitOffset(SelectExpression) |
Generates a LIMIT...OFFSET... construct in the relational command |
GenerateOperator(SqlBinaryExpression) |
Obsolete.
Generates a SQL operator for a SQL binary operation. |
GenerateOrderings(SelectExpression) |
Generates an ORDER BY clause in the relational command |
GeneratePseudoFromClause() |
Generates a pseudo FROM clause. Required by some providers when a query has no actual FROM clause. |
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. |
GenerateSetOperation(SetOperationBase) |
Generates a set operation in the relational command. |
GenerateSetOperationOperand(SetOperationBase, SelectExpression) |
Generates an operand for a given set operation in the relational command. |
GenerateTagsHeaderComment(ISet<String>) |
Generates the head comment for tags. |
GenerateTagsHeaderComment(SelectExpression) |
Obsolete.
Generates the head comment for tags. |
GenerateTop(SelectExpression) |
Generates a TOP construct in the relational command |
GenerateValues(ValuesExpression) |
Generates a VALUES expression. |
GetCommand(Expression) |
Gets a relational command for a query expression. |
GetCommand(SelectExpression) |
Gets a relational command for a SelectExpression. |
GetOperator(SqlBinaryExpression) |
Gets a SQL operator for a SQL binary operation. |
RequiresParentheses(SqlExpression, SqlExpression) |
Returns a bool value indicating if the inner SQL expression required to be put inside parenthesis when generating SQL for outer SQL expression. |
TryGenerateWithoutWrappingSelect(SelectExpression) |
If possible, generates the expression contained within the provided |
TryGetOperatorInfo(SqlExpression, Int32, Boolean) |
Returns a numeric value representing the precedence of the given |
VisitAtTimeZone(AtTimeZoneExpression) |
Visits the children of the sql "at time zone" expression. |
VisitAtTimeZone(AtTimeZoneExpression) |
Visits the children of the sql "at time zone" expression. (Inherited from SqlExpressionVisitor) |
VisitCase(CaseExpression) |
Visits the children of the case expression. |
VisitCollate(CollateExpression) |
Visits the children of the collate expression. |
VisitCollate(CollateExpression) |
Visits the children of the collate expression. (Inherited from SqlExpressionVisitor) |
VisitColumn(ColumnExpression) |
Visits the children of the column expression. |
VisitCrossApply(CrossApplyExpression) |
Visits the children of the cross apply expression. |
VisitCrossJoin(CrossJoinExpression) |
Visits the children of the cross join expression. |
VisitDelete(DeleteExpression) |
Visits the children of the delete expression. |
VisitDelete(DeleteExpression) |
Visits the children of the delete expression. (Inherited from SqlExpressionVisitor) |
VisitDistinct(DistinctExpression) |
Visits the children of the distinct expression. |
VisitDistinct(DistinctExpression) |
Visits the children of the distinct expression. (Inherited from SqlExpressionVisitor) |
VisitExcept(ExceptExpression) |
Visits the children of the except expression. |
VisitExists(ExistsExpression) |
Visits the children of the exists expression. |
VisitExtension(Expression) | (Inherited from SqlExpressionVisitor) |
VisitFromSql(FromSqlExpression) |
Visits the children of the from sql expression. |
VisitIn(InExpression) |
Visits the children of the in expression. |
VisitInnerJoin(InnerJoinExpression) |
Visits the children of the inner join expression. |
VisitIntersect(IntersectExpression) |
Visits the children of the intersect expression. |
VisitJsonScalar(JsonScalarExpression) |
Visits the children of the JSON scalar expression. |
VisitJsonScalar(JsonScalarExpression) |
Visits the children of the JSON scalar expression. (Inherited from SqlExpressionVisitor) |
VisitLeftJoin(LeftJoinExpression) |
Visits the children of the left join expression. |
VisitLike(LikeExpression) |
Visits the children of the like expression. |
VisitOrdering(OrderingExpression) |
Visits the children of the ordering expression. |
VisitOuterApply(OuterApplyExpression) |
Visits the children of the outer apply expression. |
VisitProjection(ProjectionExpression) |
Visits the children of the projection expression. |
VisitRowNumber(RowNumberExpression) |
Visits the children of the row number expression. |
VisitRowValue(RowValueExpression) |
Visits the children of the row value expression. |
VisitRowValue(RowValueExpression) |
Visits the children of the row value expression. (Inherited from SqlExpressionVisitor) |
VisitScalarSubquery(ScalarSubqueryExpression) |
Visits the children of the scalar subquery expression. |
VisitScalarSubquery(ScalarSubqueryExpression) |
Visits the children of the scalar subquery expression. (Inherited from SqlExpressionVisitor) |
VisitSelect(SelectExpression) |
Visits the children of the select expression. |
VisitSqlBinary(SqlBinaryExpression) |
Visits the children of the sql binary expression. |
VisitSqlConstant(SqlConstantExpression) |
Visits the children of the sql constant expression. |
VisitSqlFragment(SqlFragmentExpression) |
Visits the children of the sql fragment expression. |
VisitSqlFunction(SqlFunctionExpression) |
Visits the children of the sql function expression. |
VisitSqlParameter(SqlParameterExpression) |
Visits the children of the sql parameter expression. |
VisitSqlUnary(SqlUnaryExpression) |
Visits the children of the sql unary expression. |
VisitSubSelect(ScalarSubqueryExpression) | |
VisitSubSelect(ScalarSubqueryExpression) | (Inherited from SqlExpressionVisitor) |
VisitTable(TableExpression) |
Visits the children of the table expression. |
VisitTableValuedFunction(TableValuedFunctionExpression) |
Visits the children of the table valued function expression. |
VisitTableValuedFunction(TableValuedFunctionExpression) |
Visits the children of the table valued function expression. (Inherited from SqlExpressionVisitor) |
VisitUnion(UnionExpression) |
Visits the children of the union expression. |
VisitUpdate(UpdateExpression) |
Visits the children of the update expression. |
VisitUpdate(UpdateExpression) |
Visits the children of the update expression. (Inherited from SqlExpressionVisitor) |
VisitValues(ValuesExpression) |
Visits the children of the values expression. |
VisitValues(ValuesExpression) |
Visits the children of the values expression. (Inherited from SqlExpressionVisitor) |
Applies to
Entity Framework