protected override bool ForceParenthesesForQueryExpressionPart(IExprSubQuery subQuery) { return(subQuery switch { ExprQuerySpecification specification => !ReferenceEquals(specification.Top, null), _ => true });
public static ExprExists WithSubQuery(this ExprExists original, IExprSubQuery newSubQuery) => new ExprExists(subQuery: newSubQuery);
public static ExprDerivedTableQuery WithQuery(this ExprDerivedTableQuery original, IExprSubQuery newQuery) => new ExprDerivedTableQuery(query: newQuery, alias: original.Alias, columns: original.Columns);
public ExprQueryExpression(IExprSubQuery left, IExprSubQuery right, ExprQueryExpressionType queryExpressionType) { this.Left = left; this.Right = right; this.QueryExpressionType = queryExpressionType; }
public static ExprSelect AddOrderBy(this IExprSubQuery original, ExprOrderByItem orderBy, params ExprOrderByItem[] rest) => new ExprSelect(original, new ExprOrderBy(Helpers.Combine(orderBy, rest)));
public ExprInSubQuery(ExprValue testExpression, IExprSubQuery subQuery) : base(testExpression) { this.SubQuery = subQuery; }
protected abstract bool ForceParenthesesForQueryExpressionPart(IExprSubQuery subQuery);
public static ExprSelect WithSelectQuery(this ExprSelect original, IExprSubQuery newSelectQuery) => new ExprSelect(selectQuery: newSelectQuery, orderBy: original.OrderBy);
public ExprExists(IExprSubQuery subQuery) { this.SubQuery = subQuery; }
public ExprDerivedTableQuery(IExprSubQuery query, ExprTableAlias alias, IReadOnlyList <ExprColumnName>?columns) : base(alias) { this.Query = query; this.Columns = columns; }
public ExprSelectOffsetFetch(IExprSubQuery selectQuery, ExprOrderByOffsetFetch orderBy) { this.SelectQuery = selectQuery; this.OrderBy = orderBy; }
public ExprSelect(IExprSubQuery selectQuery, ExprOrderBy orderBy) { this.SelectQuery = selectQuery; this.OrderBy = orderBy; }
public static ExprSelect AddOrderBy(this IExprSubQuery original, ExprOrderBy orderBy) { orderBy.OrderList.AssertNotEmpty("Order item list cannot be empty"); return(new ExprSelect(original, orderBy)); }
public static ExprInSubQuery WithSubQuery(this ExprInSubQuery original, IExprSubQuery newSubQuery) => new ExprInSubQuery(testExpression: original.TestExpression, subQuery: newSubQuery);
public static ExprDerivedTableQuery As(this IExprSubQuery expressionBuilder, ExprTableAlias tableAlias) => new ExprDerivedTableQuery(expressionBuilder, tableAlias, null);
public static ExprQueryExpression WithRight(this ExprQueryExpression original, IExprSubQuery newRight) => new ExprQueryExpression(left: original.Left, right: newRight, queryExpressionType: original.QueryExpressionType);
protected override bool ForceParenthesesForQueryExpressionPart(IExprSubQuery subQuery) { return(false); }
public static ExprSelectOffsetFetch WithSelectQuery(this ExprSelectOffsetFetch original, IExprSubQuery newSelectQuery) => new ExprSelectOffsetFetch(selectQuery: newSelectQuery, orderBy: original.OrderBy);
public static ExprSelect AddOrderBy(this IExprSubQuery original, IReadOnlyList <ExprOrderByItem> orderItems) => new ExprSelect(original, new ExprOrderBy(orderItems.AssertNotEmpty("Order item list cannot be empty")));