Ejemplo n.º 1
0
        private SqlObjectProperty(
            SqlPropertyName name,
            SqlScalarExpression expression)
            : base(SqlObjectKind.ObjectProperty)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            this.Name       = name;
            this.Expression = expression;
        }
        private SqlCoalesceScalarExpression(
            SqlScalarExpression leftExpression,
            SqlScalarExpression rightExpression)
            : base(SqlObjectKind.CoalesceScalarExpression)
        {
            if (leftExpression == null)
            {
                throw new ArgumentNullException("leftExpression");
            }

            if (rightExpression == null)
            {
                throw new ArgumentNullException("rightExpression");
            }

            this.LeftExpression  = leftExpression;
            this.RightExpression = rightExpression;
        }
        private SqlMemberIndexerScalarExpression(
            SqlScalarExpression memberExpression,
            SqlScalarExpression indexExpression)
            : base(SqlObjectKind.MemberIndexerScalarExpression)
        {
            if (memberExpression == null)
            {
                throw new ArgumentNullException("memberExpression");
            }

            if (indexExpression == null)
            {
                throw new ArgumentNullException("indexExpression");
            }

            this.MemberExpression = memberExpression;
            this.IndexExpression  = indexExpression;
        }
Ejemplo n.º 4
0
        public static SqlMemberIndexerScalarExpression CreateSqlMemberIndexerScalarExpression(
            SqlScalarExpression first,
            SqlScalarExpression second,
            params SqlScalarExpression[] everythingElse)
        {
            List <SqlScalarExpression> segments = new List <SqlScalarExpression>(2 + everythingElse.Length);

            segments.Add(first);
            segments.Add(second);
            segments.AddRange(everythingElse);

            SqlMemberIndexerScalarExpression rootExpression = SqlMemberIndexerScalarExpression.Create(first, second);

            foreach (SqlScalarExpression indexer in segments.Skip(2))
            {
                rootExpression = SqlMemberIndexerScalarExpression.Create(rootExpression, indexer);
            }

            return(rootExpression);
        }
Ejemplo n.º 5
0
 public static SqlObjectProperty Create(
     SqlPropertyName name,
     SqlScalarExpression expression)
 {
     return(new SqlObjectProperty(name, expression));
 }
Ejemplo n.º 6
0
 public static SqlOrderByItem Create(SqlScalarExpression expression, bool isDescending)
 {
     return(new SqlOrderByItem(expression, isDescending));
 }
Ejemplo n.º 7
0
 public static SqlPropertyRefScalarExpression Create(
     SqlScalarExpression memberExpression,
     SqlIdentifier propertyIdentifier)
 {
     return(new SqlPropertyRefScalarExpression(memberExpression, propertyIdentifier));
 }
 public static SqlCoalesceScalarExpression Create(
     SqlScalarExpression leftExpression,
     SqlScalarExpression rightExpression)
 {
     return(new SqlCoalesceScalarExpression(leftExpression, rightExpression));
 }
 public static SqlMemberIndexerScalarExpression Create(
     SqlScalarExpression memberExpression,
     SqlScalarExpression indexExpression)
 {
     return(new SqlMemberIndexerScalarExpression(memberExpression, indexExpression));
 }
Ejemplo n.º 10
0
 public static SqlSelectValueSpec Create(SqlScalarExpression expression)
 {
     return(new SqlSelectValueSpec(expression));
 }
Ejemplo n.º 11
0
 public static SqlWhereClause Create(SqlScalarExpression filterExpression)
 {
     return(new SqlWhereClause(filterExpression));
 }
Ejemplo n.º 12
0
 public static SqlSelectItem Create(
     SqlScalarExpression expression,
     SqlIdentifier alias = null)
 {
     return(new SqlSelectItem(expression, alias));
 }
 public static SqlInScalarExpression Create(SqlScalarExpression expression, bool not, IReadOnlyList <SqlScalarExpression> items)
 {
     return(new SqlInScalarExpression(expression, not, items));
 }
 public static SqlInScalarExpression Create(SqlScalarExpression expression, bool not, params SqlScalarExpression[] items)
 {
     return(new SqlInScalarExpression(expression, not, items));
 }
Ejemplo n.º 15
0
 public static SqlUnaryScalarExpression Create(
     SqlUnaryScalarOperatorKind operatorKind,
     SqlScalarExpression expression)
 {
     return(new SqlUnaryScalarExpression(operatorKind, expression));
 }