private static List <CommandExpression> MergeArguments(CommandExpression argument, IEnumerable <object> arguments) { var collection = new List <CommandExpression>(); collection.Add(argument); collection.AddRange(arguments.Select(CommandExpression.FromValue)); return(collection); }
private static string FormatExpression(CommandExpression expr) { if (ReferenceEquals(expr, null)) { return("null"); } else { return(expr.Format()); } }
private void EvaluateExpressions() { if (!ReferenceEquals(_tableExpression, null)) { From(_tableExpression.AsString()); _tableExpression = null; } if (!ReferenceEquals(_whereExpression, null)) { _where = _whereExpression.Format(); _whereExpression = null; } }
private bool NeedsGrouping(CommandExpression expr) { if (_operator == ExpressionOperator.None) { return(false); } if (ReferenceEquals(expr, null)) { return(false); } if (expr._operator == ExpressionOperator.None) { return(false); } int outerPrecedence = GetPrecedence(_operator); int innerPrecedence = GetPrecedence(expr._operator); return(outerPrecedence < innerPrecedence); }
public ICommandBuilder <ResultRow> From(CommandExpression expression) { return(new CommandBuilder <ResultRow>(expression)); }
public ICommandBuilder <object> From(CommandExpression expression) { return(new CommandBuilder <object>(expression)); }
protected CommandExpression(CommandExpression caller, ExpressionFunction function) { _functionCaller = caller; this.Function = function; }
protected CommandExpression(CommandExpression caller, string reference) { _functionCaller = caller; this.Reference = reference; }
protected CommandExpression(CommandExpression left, CommandExpression right, ExpressionOperator expressionOperator) { _left = left; _right = right; _operator = expressionOperator; }
public ICommandBuilder <IDictionary <string, object> > From(CommandExpression expression) { return(new CommandBuilder <IDictionary <string, object> >(expression)); }
public ResultCollection FindAll(CommandExpression expression) { return(Execute().ToEnumerable().ToObject <ResultCollection>(EnableDynamics)); }
public ResultRow FindOne(CommandExpression expression) { return(FindOne <ResultRow>()); }
public void Where(CommandExpression condition) { _whereExpression = condition; }