internal void AddClause <T, TProperty>(Expression <Func <T, TProperty> > selector, Operator @operator, TProperty value, string clause) { AppendSQL(clause, selector, value, @operator.AsString()); }
public static ExpressionType AsExpressionType(this Operator op) { if (op == Operator.Add) { return(ExpressionType.Add); } if (op == Operator.Subtract) { return(ExpressionType.Subtract); } if (op == Operator.Divide) { return(ExpressionType.Divide); } if (op == Operator.Multiply) { return(ExpressionType.Multiply); } if (op == Operator.Equal) { return(ExpressionType.Equal); } if (op == Operator.NotEqual) { return(ExpressionType.NotEqual); } throw new NotSupportedException(String.Format("Operator {0} does not resolve into an expression type.", op.AsString())); }
/// <summary> /// The default operator used if no explicit operator is specified. /// For example, with a default operator of OR, the query capital of Hungary is translated to capital OR of OR Hungary, /// and with default operator of AND, the same query is translated to capital AND of AND Hungary. /// The default value is OR. /// </summary> public FieldQuery <T> DefaultOperator(Operator defaultOperator) { RegisterJsonPart("'default_operator': {0}", defaultOperator.AsString().Quotate()); return(this); }
/// <summary> /// The default operator to be used, can be AND or OR. Defaults to OR. /// </summary> public DeleteByQueryCommand DefaultOperator(Operator defaultOperator = Operator.OR) { WithParameter("default_operator", defaultOperator.AsString()); return(this); }
/// <summary> /// The default operator to be used, can be AND or OR. Defaults to OR /// </summary> public CountCommand DefaultOperator(Operator defaultOperator) { WithParameter("default_operator", defaultOperator.AsString()); return(this); }
/// <summary> /// Controls how boolean text query parts are combined. /// </summary> public TQuery Operator(Operator @operator) { RegisterJsonPart("'operator': {0}", @operator.AsString().Quotate()); return((TQuery)this); }