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));
        }
        public override SqlObject Visit(SqlFunctionCallScalarExpression sqlFunctionCallScalarExpression)
        {
            SqlScalarExpression[] items = new SqlScalarExpression[sqlFunctionCallScalarExpression.Arguments.Count];
            for (int i = 0; i < sqlFunctionCallScalarExpression.Arguments.Count; i++)
            {
                items[i] = sqlFunctionCallScalarExpression.Arguments[i].Accept(this) as SqlScalarExpression;
            }

            return(SqlFunctionCallScalarExpression.Create(
                       sqlFunctionCallScalarExpression.Name,
                       sqlFunctionCallScalarExpression.IsUdf,
                       items));
        }
        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 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 SqlFunctionCallScalarExpression CreateBuiltin(
     string name,
     params SqlScalarExpression[] arguments) => SqlFunctionCallScalarExpression.Create(name, false, arguments);
 public static SqlFunctionCallScalarExpression CreateBuiltin(
     string name,
     IReadOnlyList <SqlScalarExpression> arguments) => SqlFunctionCallScalarExpression.Create(name, false, arguments);