private SqlIdentifierPathExpression(SqlPathExpression parentPath, SqlIdentifier value)
            : base(SqlObjectKind.IdentifierPathExpression, parentPath)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }

            this.Value = value;
        }
Exemplo n.º 2
0
        public static SqlIdentifier Create(string value)
        {
            SqlIdentifier sqlIdentifier;

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

            return(sqlIdentifier);
        }
        public static SqlFunctionCallScalarExpression Create(
            string name,
            bool isUdf,
            IReadOnlyList <SqlScalarExpression> arguments)
        {
            if (!SqlFunctionCallScalarExpression.FunctionIdentifiers.TryGetValue(name, out SqlIdentifier sqlIdentifier))
            {
                sqlIdentifier = SqlIdentifier.Create(name);
            }

            return(SqlFunctionCallScalarExpression.Create(sqlIdentifier, isUdf, arguments));
        }
Exemplo n.º 4
0
        private SqlPropertyRefScalarExpression(
            SqlScalarExpression memberExpression,
            SqlIdentifier propertyIdentifier)
            : base(SqlObjectKind.PropertyRefScalarExpression)
        {
            if (propertyIdentifier == null)
            {
                throw new ArgumentNullException("propertyIdentifier");
            }

            this.MemberExpression   = memberExpression;
            this.PropertyIdentifier = propertyIdentifier;
        }
Exemplo n.º 5
0
        private SqlSelectItem(
            SqlScalarExpression expression,
            SqlIdentifier alias)
            : base(SqlObjectKind.SelectItem)
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            this.Expression = expression;
            this.Alias      = alias;
        }
Exemplo n.º 6
0
        private SqlAliasedCollectionExpression(
            SqlCollection collection,
            SqlIdentifier alias)
            : base(SqlObjectKind.AliasedCollectionExpression)
        {
            if (collection == null)
            {
                throw new ArgumentNullException("collection");
            }

            this.Collection = collection;
            this.Alias      = alias;
        }
Exemplo n.º 7
0
        private SqlInputPathCollection(
            SqlIdentifier input,
            SqlPathExpression relativePath)
            : base(SqlObjectKind.InputPathCollection)
        {
            if (input == null)
            {
                throw new ArgumentNullException("input");
            }

            this.Input        = input;
            this.RelativePath = relativePath;
        }
        public static SqlFunctionCallScalarExpression Create(
            string name,
            bool isUdf,
            params SqlScalarExpression[] arguments)
        {
            SqlIdentifier sqlIdentifier;

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

            return(SqlFunctionCallScalarExpression.Create(sqlIdentifier, isUdf, arguments));
        }
        public SqlFunctionCallScalarExpression(
            SqlIdentifier name,
            SqlScalarExpression[] arguments,
            bool isUdf)
            : base(SqlObjectKind.FunctionCallScalarExpression)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            this.Arguments = arguments;
            this.Name      = name;
            this.IsUdf     = isUdf;
        }
        public SqlSubqueryCollectionExpression(SqlIdentifier inputIdentifier, SqlSubqueryCollection query)
            : base(SqlObjectKind.SubqueryCollectionExpression)
        {
            if (inputIdentifier == null)
            {
                throw new ArgumentException("inputIdentifier");
            }

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

            this.InputIdentifier = inputIdentifier;
            this.Query           = query;
        }
        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;
        }
        private SqlFunctionCallScalarExpression(
            SqlIdentifier name,
            bool isUdf,
            IReadOnlyList <SqlScalarExpression> arguments)
        {
            if (arguments == null)
            {
                throw new ArgumentNullException($"{nameof(arguments)} must not be null.");
            }

            foreach (SqlScalarExpression argument in arguments)
            {
                if (argument == null)
                {
                    throw new ArgumentNullException($"{nameof(arguments)} must not have null items.");
                }
            }

            this.Arguments = new List <SqlScalarExpression>(arguments);
            this.Name      = name ?? throw new ArgumentNullException(nameof(name));
            this.IsUdf     = isUdf;
        }
Exemplo n.º 13
0
 public static SqlSelectItem Create(
     SqlScalarExpression expression,
     SqlIdentifier alias = null)
 {
     return(new SqlSelectItem(expression, alias));
 }
 public static SqlAliasedCollectionExpression Create(
     SqlCollection collection,
     SqlIdentifier alias) => new SqlAliasedCollectionExpression(collection, alias);
 public static SqlFunctionCallScalarExpression CreateBuiltin(SqlIdentifier name, params SqlScalarExpression[] arguments)
 {
     return(SqlFunctionCallScalarExpression.Create(name, false, arguments));
 }
 public static SqlFunctionCallScalarExpression CreateBuiltin(SqlIdentifier name, IReadOnlyList <SqlScalarExpression> arguments)
 {
     return(SqlFunctionCallScalarExpression.Create(name, false, arguments));
 }
 public static SqlArrayIteratorCollectionExpression Create(
     SqlIdentifier alias,
     SqlCollection collection)
 {
     return(new SqlArrayIteratorCollectionExpression(alias, collection));
 }
Exemplo n.º 18
0
 public static SqlArrayIteratorCollectionExpression Create(
     SqlIdentifier identifier,
     SqlCollection collection) => new SqlArrayIteratorCollectionExpression(identifier, collection);
 public static SqlIdentifierPathExpression Create(SqlPathExpression parentPath, SqlIdentifier value)
 {
     return(new SqlIdentifierPathExpression(parentPath, value));
 }
 public override void Visit(SqlIdentifier sqlIdentifier)
 {
     this.writer.Write(sqlIdentifier.Value);
 }
Exemplo n.º 21
0
 public static SqlInputPathCollection Create(
     SqlIdentifier input,
     SqlPathExpression relativePath)
 {
     return(new SqlInputPathCollection(input, relativePath));
 }
 public static SqlFunctionCallScalarExpression Create(
     SqlIdentifier name,
     bool isUdf,
     params SqlScalarExpression[] arguments) => new SqlFunctionCallScalarExpression(name, isUdf, arguments);
 public static SqlFunctionCallScalarExpression Create(
     SqlIdentifier name,
     bool isUdf,
     IReadOnlyList <SqlScalarExpression> arguments) => new SqlFunctionCallScalarExpression(name, isUdf, arguments);
Exemplo n.º 24
0
 public static SqlPropertyRefScalarExpression Create(
     SqlScalarExpression memberExpression,
     SqlIdentifier propertyIdentifier)
 {
     return(new SqlPropertyRefScalarExpression(memberExpression, propertyIdentifier));
 }
 private SqlIdentifierPathExpression(SqlPathExpression parentPath, SqlIdentifier value)
     : base(parentPath)
 {
     this.Value = value ?? throw new ArgumentNullException(nameof(value));
 }
 public SqlFunctionCallScalarExpression(
     SqlIdentifier name,
     SqlScalarExpression[] arguments)
     : this(name, arguments, false)
 {
 }
 public static SqlPropertyRefScalarExpression Create(
     SqlScalarExpression member,
     SqlIdentifier identifier) => new SqlPropertyRefScalarExpression(member, identifier);