Esempio n. 1
0
        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);
Esempio n. 3
0
 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);
Esempio n. 6
0
 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);
Esempio n. 8
0
 private SqlTopSpec(SqlScalarExpression topExpression)
 {
     this.TopExpresion = topExpression ?? throw new ArgumentNullException(nameof(topExpression));
 }
Esempio n. 9
0
 public static SqlInScalarExpression Create(
     SqlScalarExpression needle,
     bool not,
     ImmutableArray <SqlScalarExpression> haystack) => new SqlInScalarExpression(needle, not, haystack);
Esempio n. 10
0
 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));
 }
Esempio n. 17
0
 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);
Esempio n. 19
0
 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));
 }
Esempio n. 22
0
 public static SqlOrderByItem Create(
     SqlScalarExpression expression,
     bool isDescending)
 {
     return(new SqlOrderByItem(expression, isDescending));
 }
Esempio n. 23
0
 public static SqlMemberIndexerScalarExpression Create(
     SqlScalarExpression member,
     SqlScalarExpression indexer) => new SqlMemberIndexerScalarExpression(member, indexer);