company logo

OperationHandle :: CheckExpression - Check validity of an expression

The function checks whether the expression passed to the function is syntactically correct (NO) or not (YES, error).

Return value:  Success ( logical  )

Implementation details

  1. Check expression defined in a ODC_ImpClass
    logical OperationHandle  :: CheckExpression ( DictionaryHandle &dicthdl, DBObjectHandle &res_obhandle, NString &clsnames, NString &exprnames, NString &impnames )
    • dicthdl - Reference to dictionary handle

      This is a reference to an opened dictionary handle.

    • res_obhandle - Reference to resource database object handle

      The resource database handle usually is a database handle, which is referred to as database object handle.

    • clsnames - Class name

      sys_ident of a ODC_ImpClass, used to create a TypeKey in conjunction with nsid

    • exprnames - Expression name
    • impnames - Implementation name
  2. to list
  3. Check inline expression
    logical OperationHandle  :: CheckExpression ( DictionaryHandle &dicthdl, NString &expression, DBObjectHandle &obhandle_ref, NString &clsnames )

    The scope for the inline expression is defined by the class name passed in classnames.

    • dicthdl - Reference to dictionary handle

      This is a reference to an opened dictionary handle.

    • expression - Inline expression

      An ad hoc expression can be passed as operand (something like a + b) or as complete expression. As operand, an expression may contain any expression, which is allowed in a statement, but no semicolon should be appended. Complete expressions include expression header (optional) and may include different sections in the expression body which is enclosed in { ... }.

      In contrast to class expressions, ad hoc expressions are not defined explicitly as class expressions but passed as strings to the application at run time.

      operand: a + funct(b)

      complete expression :

      bool expr(int a)

      {

      return(a*a);

      }

    • obhandle_ref - Reference to database object handle

      The reference refers to an opened or not opened database object handle.

    • clsnames - Class name

      sys_ident of a ODC_ImpClass, used to create a TypeKey in conjunction with nsid

  4. to list