コード例 #1
0
 public expression(Ioperand ol, comparisonoperator _opdef, Ioperand or)
 {
     /* binary operation */
     operand_l = ol;
     opdef     = _opdef;
     operand_r = or;
 }
コード例 #2
0
        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;
        }
コード例 #3
0
ファイル: shortcuts.cs プロジェクト: en-software-GmbH/sherm2
 public static Iexpressionlistitem where_fld_op(string tablealias1, string fieldname1, comparisonoperator op, string tablealias2, string fieldname2)
 {
     return(new expression(new operand(new selectfield(tablealias1, fieldname1)), op, new operand(new selectfield(tablealias2, fieldname2))));
 }
コード例 #4
0
ファイル: shortcuts.cs プロジェクト: en-software-GmbH/sherm2
 public static Iexpressionlistitem where_fld_op_p(string fieldname, comparisonoperator op, string paramname, DbType paramtype)
 {
     return(new expression(new operand(fieldname), op, new param(new selectparam(paramname, paramtype))));
 }
コード例 #5
0
ファイル: shortcuts.cs プロジェクト: en-software-GmbH/sherm2
 public static Iexpressionlistitem where_fld_op_subquery(string tablealias, string fieldname, comparisonoperator op, subquery in_subquery)
 {
     return(new expression(new operand(new selectfield(tablealias, fieldname)), op, new operand(new selectfield(in_subquery, null))));
 }