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