Пример #1
0
        public static SqlIdentifier Create(string value)
        {
            SqlIdentifier sqlIdentifier;

            if (!SqlIdentifier.FrequentIdentifiers.TryGetValue(value, out sqlIdentifier))
            {
                sqlIdentifier = new SqlIdentifier(value);
            }

            return(sqlIdentifier);
        }
        private SqlInputPathCollection(
            SqlIdentifier input,
            SqlPathExpression relativePath)
            : base(SqlObjectKind.InputPathCollection)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }

            this.Input        = input;
            this.RelativePath = relativePath;
        }
Пример #3
0
        private SqlSelectItem(
            SqlScalarExpression expression,
            SqlIdentifier alias)
            : base(SqlObjectKind.SelectItem)
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            this.Expression = expression;
            this.Alias      = alias;
        }
Пример #4
0
        private SqlPropertyRefScalarExpression(
            SqlScalarExpression memberExpression,
            SqlIdentifier propertyIdentifier)
            : base(SqlObjectKind.PropertyRefScalarExpression)
        {
            if (propertyIdentifier == null)
            {
                throw new ArgumentNullException("propertyIdentifier");
            }

            this.MemberExpression   = memberExpression;
            this.PropertyIdentifier = propertyIdentifier;
        }
Пример #5
0
        private SqlAliasedCollectionExpression(
            SqlCollection collection,
            SqlIdentifier alias)
            : base(SqlObjectKind.AliasedCollectionExpression)
        {
            if (collection == null)
            {
                throw new ArgumentNullException("collection");
            }

            this.Collection = collection;
            this.Alias      = alias;
        }
Пример #6
0
        public static SqlFunctionCallScalarExpression Create(
            string name,
            bool isUdf,
            IReadOnlyList <SqlScalarExpression> arguments)
        {
            SqlIdentifier sqlIdentifier;

            if (!SqlFunctionCallScalarExpression.FunctionIdentifiers.TryGetValue(name, out sqlIdentifier))
            {
                sqlIdentifier = SqlIdentifier.Create(name);
            }

            return(SqlFunctionCallScalarExpression.Create(sqlIdentifier, isUdf, arguments));
        }
        private SqlArrayIteratorCollectionExpression(
            SqlIdentifier alias,
            SqlCollection collection)
            : base(SqlObjectKind.ArrayIteratorCollectionExpression)
        {
            if (alias == null)
            {
                throw new ArgumentNullException("alias");
            }

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

            this.Alias      = alias;
            this.Collection = collection;
        }
 public static SqlInputPathCollection Create(
     SqlIdentifier input,
     SqlPathExpression relativePath)
 {
     return(new SqlInputPathCollection(input, relativePath));
 }
Пример #9
0
 public static SqlIdentifierPathExpression Create(SqlPathExpression parentPath, SqlIdentifier value)
 {
     return(new SqlIdentifierPathExpression(parentPath, value));
 }
Пример #10
0
 public static SqlFunctionCallScalarExpression CreateBuiltin(SqlIdentifier name, params SqlScalarExpression[] arguments)
 {
     return(SqlFunctionCallScalarExpression.Create(name, false, arguments));
 }
Пример #11
0
 public static SqlFunctionCallScalarExpression CreateBuiltin(SqlIdentifier name, IReadOnlyList <SqlScalarExpression> arguments)
 {
     return(SqlFunctionCallScalarExpression.Create(name, false, arguments));
 }
Пример #12
0
 public static SqlPropertyRefScalarExpression Create(
     SqlScalarExpression memberExpression,
     SqlIdentifier propertyIdentifier)
 {
     return(new SqlPropertyRefScalarExpression(memberExpression, propertyIdentifier));
 }
Пример #13
0
 public static SqlSelectItem Create(
     SqlScalarExpression expression,
     SqlIdentifier alias = null)
 {
     return(new SqlSelectItem(expression, alias));
 }
Пример #14
0
 public static SqlAliasedCollectionExpression Create(
     SqlCollection collection,
     SqlIdentifier alias)
 {
     return(new SqlAliasedCollectionExpression(collection, alias));
 }
 public static SqlArrayIteratorCollectionExpression Create(
     SqlIdentifier alias,
     SqlCollection collection)
 {
     return(new SqlArrayIteratorCollectionExpression(alias, collection));
 }