public expression(Ioperand ol, comparisonoperator _opdef, Ioperand or) { /* binary operation */ operand_l = ol; opdef = _opdef; operand_r = or; }
public Ioperand operand_r; /* null for non-binary operators */ public expression(Ioperand ol, comparisonoperator _opdef) { /* unary: only limited subset of possible operators */ switch (_opdef) { case comparisonoperator.coIsnull: case comparisonoperator.coNotnull: case comparisonoperator.coHastext: case comparisonoperator.coHasNoText: case comparisonoperator.coExists: case comparisonoperator.coNotExists: break; default: throw new ArgumentOutOfRangeException(String.Format("_opdef '{0}' asks for two operands", _opdef.ToString())); } operand_l = ol; opdef = _opdef; /* [rzamponi 20100112] FxCop CA1805:DoNotInitializeUnnecessarily */ //operand_r = null; }
public selectfield(selectfunctiondef func, expression expression, string rowsource_consumeralias, Ioperand literalconst, string fieldname, string asname, selectstatement subqry, sortorder order) { /* [rzamponi 20100112] FxCop CA1805:DoNotInitializeUnnecessarily */ //if (func == selectfunctiondef.none) Function = null; else Function = new selectfunction(func); if (func != selectfunctiondef.none) { Function = new selectfunction(func); } Expression = expression; RowsourceConsumerAlias = rowsource_consumeralias; literal = literalconst; Fieldname = fieldname; AsName = asname; subquery = subqry; if (order == sortorder.so_asc) { Ascending = true; } else if (order == sortorder.so_desc) { Descending = true; } }
public selectfield(selectfunctiondef func, string rowsource_consumeralias, Ioperand literalconst, string fieldname, string asname, selectstatement subqry, sortorder order) : this(func, null, rowsource_consumeralias, literalconst, fieldname, asname, subqry, order) { }