private SqlInScalarExpression( SqlScalarExpression needle, bool not, ImmutableArray <SqlScalarExpression> haystack) { if (haystack.IsEmpty) { throw new ArgumentException("items can't be empty."); } foreach (SqlScalarExpression item in haystack) { if (item == null) { throw new ArgumentException("items can't have a null item."); } } this.Needle = needle ?? throw new ArgumentNullException(nameof(needle)); this.Not = not; this.Haystack = haystack; }
public static SqlBinaryScalarExpression Create( SqlBinaryScalarOperatorKind operatorKind, SqlScalarExpression left, SqlScalarExpression right) => new SqlBinaryScalarExpression(operatorKind, left, right);
public static SqlBetweenScalarExpression Create( SqlScalarExpression expression, SqlScalarExpression startInclusive, SqlScalarExpression endInclusive, bool not) => new SqlBetweenScalarExpression(expression, startInclusive, endInclusive, not);
public static SqlObjectProperty Create( SqlPropertyName name, SqlScalarExpression expression) => new SqlObjectProperty(name, expression);
public static SqlSelectValueSpec Create(SqlScalarExpression expression) => new SqlSelectValueSpec(expression);
public static SqlUnaryScalarExpression Create( SqlUnaryScalarOperatorKind operatorKind, SqlScalarExpression expression) { return(new SqlUnaryScalarExpression(operatorKind, expression)); }
public static SqlInScalarExpression Create( SqlScalarExpression needle, bool not, params SqlScalarExpression[] haystack) => new SqlInScalarExpression(needle, not, haystack);
private SqlTopSpec(SqlScalarExpression topExpression) { this.TopExpresion = topExpression ?? throw new ArgumentNullException(nameof(topExpression)); }
public static SqlInScalarExpression Create( SqlScalarExpression needle, bool not, ImmutableArray <SqlScalarExpression> haystack) => new SqlInScalarExpression(needle, not, haystack);
public static SqlSelectItem Create( SqlScalarExpression expression, SqlIdentifier alias = null) { return(new SqlSelectItem(expression, alias)); }
public static SqlCoalesceScalarExpression Create( SqlScalarExpression left, SqlScalarExpression right) => new SqlCoalesceScalarExpression(left, right);
public static SqlSelectValueSpec Create(SqlScalarExpression expression) { return(new SqlSelectValueSpec(expression)); }
private SqlSelectValueSpec( SqlScalarExpression expression) { this.Expression = expression ?? throw new ArgumentNullException(nameof(expression)); }
public static SqlPropertyRefScalarExpression Create( SqlScalarExpression member, SqlIdentifier identifier) => new SqlPropertyRefScalarExpression(member, identifier);
public static SqlWhereClause Create(SqlScalarExpression filterExpression) => new SqlWhereClause(filterExpression);
private SqlLimitSpec(SqlScalarExpression limitExpression) { this.LimitExpression = limitExpression ?? throw new ArgumentNullException(nameof(limitExpression)); }
private SqlWhereClause(SqlScalarExpression filterExpression) { this.FilterExpression = filterExpression ?? throw new ArgumentNullException(nameof(filterExpression)); }
public static SqlConditionalScalarExpression Create( SqlScalarExpression condition, SqlScalarExpression consequent, SqlScalarExpression alternative) => new SqlConditionalScalarExpression(condition, consequent, alternative);
public static SqlWhereClause Create(SqlScalarExpression filterExpression) { return(new SqlWhereClause(filterExpression)); }
public static SqlInScalarExpression Create( SqlScalarExpression needle, bool not, IReadOnlyList <SqlScalarExpression> haystack) => new SqlInScalarExpression(needle, not, haystack);
private SqlOffsetSpec(SqlScalarExpression offsetExpression) { this.OffsetExpression = offsetExpression ?? throw new ArgumentNullException(nameof(offsetExpression)); }
public static SqlOrderByItem Create( SqlScalarExpression expression, bool isDescending) { return(new SqlOrderByItem(expression, isDescending)); }
public static SqlMemberIndexerScalarExpression Create( SqlScalarExpression member, SqlScalarExpression indexer) => new SqlMemberIndexerScalarExpression(member, indexer);