Ejemplo 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);
Ejemplo 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);
Ejemplo 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);
Ejemplo n.º 8
0
 private SqlTopSpec(SqlScalarExpression topExpression)
 {
     this.TopExpresion = topExpression ?? throw new ArgumentNullException(nameof(topExpression));
 }
Ejemplo n.º 9
0
 public static SqlInScalarExpression Create(
     SqlScalarExpression needle,
     bool not,
     ImmutableArray <SqlScalarExpression> haystack) => new SqlInScalarExpression(needle, not, haystack);
Ejemplo 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);
Ejemplo n.º 15
0
 public static SqlWhereClause Create(SqlScalarExpression filterExpression) => new SqlWhereClause(filterExpression);
Ejemplo n.º 16
0
 private SqlLimitSpec(SqlScalarExpression limitExpression)
 {
     this.LimitExpression = limitExpression ?? throw new ArgumentNullException(nameof(limitExpression));
 }
Ejemplo 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);
Ejemplo 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);
Ejemplo n.º 21
0
 private SqlOffsetSpec(SqlScalarExpression offsetExpression)
 {
     this.OffsetExpression = offsetExpression ?? throw new ArgumentNullException(nameof(offsetExpression));
 }
Ejemplo n.º 22
0
 public static SqlOrderByItem Create(
     SqlScalarExpression expression,
     bool isDescending)
 {
     return(new SqlOrderByItem(expression, isDescending));
 }
Ejemplo n.º 23
0
 public static SqlMemberIndexerScalarExpression Create(
     SqlScalarExpression member,
     SqlScalarExpression indexer) => new SqlMemberIndexerScalarExpression(member, indexer);