Comment : Charset=windows-1252
Comment : test cases for management of user-defined types

Comment : create a type with no physical possrep components (i.e. a singleton type) - should work
Request : assert userdefinedtype,userdefinedtype(tuple(typename(m)sp_expression( )possrepname(m)))
Reply   : 

Comment : test it
Request : inquire extend(table_dee,mv(m()))
Reply   : RELATION(HEADING(MV(M))BODY(TUPLE(MV())))
Request : inquire extend(table_dee,mv1gtmv2(gt(m(),m())))
Reply   : 1497858657:253:Operator implementation for operator GT(M;M) could not be loaded. The cause of this problem was a be.erwinsmout.NotFoundException with message GT_M_M.
Request : inquire extend(table_dee,mintrv(minterval(begin(m()))))
Reply   : 1497858657:253:Operator implementation for operator BEGIN(M) could not be loaded. The cause of this problem was a be.erwinsmout.NotFoundException with message BEGIN_M.
Request : inquire extend(table_dee,mv1eqmv2(eq(m(),m())))
Reply   : RELATION(HEADING(MV1EQMV2(BOOLEAN))BODY(TUPLE(MV1EQMV2(True))))

Comment : add an ordering operator - should fail on absence of parameters for the two values to be compared
Request : assert udtorderingoperator,udtorderingoperator(tuple(typename(m)sp_expression( boolean\(true\) )))
Reply   : 201806116:177:The expression defining the ordering operator for user-defined type M, is not a boolean expression, or it involves database relvar references, or it does not exclusively involve exactly two parameters named V1 and V2 respectively, both of the declared user-defined type.

Comment : add an ordering operator - ludicrous but technically correct - should work 
Request : assert udtorderingoperator,udtorderingoperator(tuple(typename(m)sp_expression( eq\(parameter\(v1\(m\)\),parameter\(v2\(m\)\)\) )))
Reply   : 

Comment : test it
Request : inquire extend(table_dee,mv1gtmv2(gt(m(),m())))
Reply   : RELATION(HEADING(MV1GTMV2(BOOLEAN))BODY(TUPLE(MV1GTMV2(True))))
Request : inquire extend(table_dee,mintrv(minterval(begin(m()))))
Reply   : RELATION(HEADING(MINTRV(MINTERVAL))BODY(TUPLE(MINTRV(BEGIN()))))

Comment : drop an ordering operator - should work
Request : unassert udtorderingoperator,udtorderingoperator(tuple(typename(m)sp_expression( eq\(parameter\(v1\(m\)\),parameter\(v2\(m\)\)\) )))
Reply   : 

Comment : test it - gt() invocation should now fail, all the others should still be operational
Request : inquire extend(table_dee,mv(m()))
Reply   : RELATION(HEADING(MV(M))BODY(TUPLE(MV())))
Request : inquire extend(table_dee,mv1gtmv2(gt(m(),m())))
Reply   : 1497858657:253:Operator implementation for operator GT(M;M) could not be loaded. The cause of this problem was a be.erwinsmout.NotFoundException with message GT_M_M.
Request : inquire extend(table_dee,mintrv(minterval(begin(m()))))
Reply   : 1497858657:253:Operator implementation for operator BEGIN(M) could not be loaded. The cause of this problem was a be.erwinsmout.NotFoundException with message BEGIN_M.
Request : inquire extend(table_dee,mv1eqmv2(eq(m(),m())))
Reply   : RELATION(HEADING(MV1EQMV2(BOOLEAN))BODY(TUPLE(MV1EQMV2(True))))

Comment : drop the type with no physical possrep components (i.e. a singleton type) - should work
Request : unassert userdefinedtype,userdefinedtype(tuple(typename(m)sp_expression( )possrepname(m)))
Reply   : 

Comment : test it
Request : inquire extend(table_dee,mv(m()))
Reply   : 1497858657:253:Operator implementation for operator M() could not be loaded. The cause of this problem was a be.erwinsmout.NotFoundException with message M.
Request : inquire extend(table_dee,mv1gtmv2(gt(m(),m())))
Reply   : 1497858657:253:Operator implementation for operator M() could not be loaded. The cause of this problem was a be.erwinsmout.NotFoundException with message M.
Request : inquire extend(table_dee,mintrv(minterval(begin(m()))))
Reply   : 1497858657:253:Operator implementation for operator BEGIN(M) could not be loaded. The cause of this problem was a be.erwinsmout.NotFoundException with message BEGIN_M.
Request : inquire extend(table_dee,mv1eqmv2(eq(m(),m())))
Reply   : 1497858657:253:Operator implementation for operator M() could not be loaded. The cause of this problem was a be.erwinsmout.NotFoundException with message M.

Comment : add the type and the orderingoperator in one go (tests whether the type object is available to the process compiling the ordering operator expression)
Request : cmd(assert userdefinedtype,userdefinedtype(tuple(typename(m)sp_expression( )possrepname(m))))cmd(assert udtorderingoperator,udtorderingoperator(tuple(typename(m)sp_expression( eq\(parameter\(v1\(m\)\),parameter\(v2\(m\)\)\) ))))
Reply   : 

Comment : test it
Request : inquire extend(table_dee,mv(m()))
Reply   : RELATION(HEADING(MV(M))BODY(TUPLE(MV())))
Request : inquire extend(table_dee,mv1gtmv2(gt(m(),m())))
Reply   : RELATION(HEADING(MV1GTMV2(BOOLEAN))BODY(TUPLE(MV1GTMV2(True))))
Request : inquire extend(table_dee,mintrv(minterval(begin(m()))))
Reply   : RELATION(HEADING(MINTRV(MINTERVAL))BODY(TUPLE(MINTRV(BEGIN()))))
Request : inquire extend(table_dee,mv1eqmv2(eq(m(),m())))
Reply   : RELATION(HEADING(MV1EQMV2(BOOLEAN))BODY(TUPLE(MV1EQMV2(True))))

Comment : drop them back again
Request : cmd(unassert userdefinedtype,userdefinedtype(tuple(typename(m)sp_expression( )possrepname(m))))cmd(unassert udtorderingoperator,udtorderingoperator(tuple(typename(m)sp_expression( eq\(parameter\(v1\(m\)\),parameter\(v2\(m\)\)\) ))))
Reply   : 

END
