Comment : Charset=windows-1252
Comment : test cases for the escape syntax of the language
Request : cmd(assert attribute,attribute(tuple(attributename(str1)typename(string))tuple(attributename(str2)typename(string))))cmd(assert attributelogicallength,attributelogicallength(tuple(attributename(str1)logicallength(12))tuple(attributename(str2)logicallength(16))))cmd(assert relvar,relvar(tuple(relvarname(esc1)relvarpredicate(str1 and str2.))))cmd(assert relvarattribute,relvarattribute(tuple(relvarname(esc1)attributename(str1))tuple(relvarname(esc1)attributename(str2))))
Reply   : 
Request : cmd(assert storagespace,storagespace(tuple(filename(esc1a.spdb)extentscount(2)pagecount(20)storagespaceid(1))tuple(filename(esc1a.spdb)extentscount(2)pagecount(20)storagespaceid(2))))cmd(assert dataspace,dataspace(tuple(filename(esc1a.spdb)storagespaceid(1)gapcompressionthreshold(5)maximumgaps(9))))cmd(assert dbmsfile,dbmsfile(tuple(filename(esc1a.spdb)pagesize(16384)))))cmd(assert multihashingindexspace,multihashingindexspace(tuple(filename(esc1a.spdb)storagespaceid(2)gapcompressionthreshold(5)maximumgaps(9))))
Reply   : 
Request : cmd(assert recordtype,recordtype(tuple(filename(esc1a.spdb)storagespaceid(1)indexname(loc1esc1)recordtypename(esc1)relvarname(esc1))))cmd(assert index,index(tuple(filename(esc1a.spdb)storagespaceid(2)recordtypename(esc1)relvarname(esc1)indexname(loc1esc1))))cmd(assert recordattribute,recordattribute(tuple(recordtypename(esc1)relvarname(esc1)attributename(str1)ordinal(10))tuple(recordtypename(esc1)relvarname(esc1)attributename(str2)ordinal(20))))cmd(assert indexcomponent,indexcomponent(tuple(relvarname(esc1)indexname(loc1esc1)ordinal(10)sp_expression(str1))))
Reply   : 

Comment : clear variable
Request : delete esc1,esc1
Reply   : 
Comment : add a tuple with empty strings
Request : add esc1,esc1(tuple(str1()str2()))
Reply   : 
Request : inquire esc1
Reply   : RELATION(HEADING(STR2(STRING)STR1(STRING))BODY(TUPLE(STR2()STR1())))
Comment : add a tuple with strings containing no metalanguage tokens
Request : assert esc1,esc1(tuple(str1(abc)str2(def)))
Reply   : 
Request : inquire esc1
Reply   : RELATION(HEADING(STR2(STRING)STR1(STRING))BODY(TUPLE(STR2(def)STR1(abc))TUPLE(STR2()STR1())))
Comment : prevent rollback
Request : commit
Reply   : 
Comment : add too long strings
Request : assert esc1,esc1(tuple(str1(abcdefghijklmnop)str2(abcdefghijkl)))
Reply   : 1497858657:456:The length 16 of value STRING(abcdefghijklmnop) exceeds the maximum length 12 of attribute STR1.
Comment : add too long strings
Request : assert esc1,esc1(tuple(str1(abcdefghijkl)str2(abcdefghijklmnopqrst)))
Reply   : 1497858657:456:The length 20 of value STRING(abcdefghijklmnopqrst) exceeds the maximum length 16 of attribute STR2.
Comment : add maximum-length strings
Request : assert esc1,esc1(tuple(str1(abcdefghijkl)str2(abcdefghijklmnop)))
Reply   : 
Request : inquire esc1
Reply   : RELATION(HEADING(STR2(STRING)STR1(STRING))BODY(TUPLE(STR2(abcdefghijklmnop)STR1(abcdefghijkl))TUPLE(STR2(def)STR1(abc))TUPLE(STR2()STR1())))
Comment : prevent rollback
Request : commit
Reply   : 
Comment : escape tests : bracket count matches, syntax wrong nevertheless
Request : assert esc1,esc1(tuple(str1())str2(()))
Reply   : 1497858657:389:The set of attribute values [STR1] specified for selecting a tuple value does not match the relvar's heading [STR2, STR1].
Comment : escape tests : bracket count matches, syntax wrong nevertheless
Request : assert esc1,esc1(tuple(str1(()str2())))
Reply   : 1497858657:389:The set of attribute values [STR1] specified for selecting a tuple value does not match the relvar's heading [STR2, STR1].
Comment : escape tests : this one should be good
Request : assert esc1,esc1(tuple(str1(\()str2(\))))
Reply   : 
Request : inquire esc1
Reply   : RELATION(HEADING(STR2(STRING)STR1(STRING))BODY(TUPLE(STR2(abcdefghijklmnop)STR1(abcdefghijkl))TUPLE(STR2(def)STR1(abc))TUPLE(STR2()STR1())TUPLE(STR2(\))STR1(\())))
Comment : prevent rollback
Request : commit
Reply   : 
Comment : escape tests : invalid backslash
Request : assert esc1,esc1(tuple(str1(\a)str2(\b)))
Reply   : 1497858657:300:Syntax error in 'esc1(tuple(str1(\a)str2(\b)))'. The cause of this problem was a be.SIRAPRISE.util.InvalidEscapedCharacterException with message Invalid character a at position 17.
Comment : escape tests : valid backslash
Request : assert esc1,esc1(tuple(str1(\\a)str2(\\b)))
Reply   : 
Request : inquire esc1
Reply   : RELATION(HEADING(STR2(STRING)STR1(STRING))BODY(TUPLE(STR2(abcdefghijklmnop)STR1(abcdefghijkl))TUPLE(STR2(def)STR1(abc))TUPLE(STR2()STR1())TUPLE(STR2(\))STR1(\())TUPLE(STR2(\\b)STR1(\\a))))
Comment : prevent rollback
Request : commit
Reply   : 
Comment : clear variable
Request : delete esc1,esc1
Reply   : 
Request : commit
Reply   : 

Request : cmd(unassert recordtype,recordtype(tuple(filename(esc1a.spdb)storagespaceid(1)indexname(loc1esc1)recordtypename(esc1)relvarname(esc1))))cmd(unassert index,index(tuple(filename(esc1a.spdb)storagespaceid(2)recordtypename(esc1)relvarname(esc1)indexname(loc1esc1))))cmd(unassert recordattribute,recordattribute(tuple(recordtypename(esc1)relvarname(esc1)attributename(str1)ordinal(10))tuple(recordtypename(esc1)relvarname(esc1)attributename(str2)ordinal(20))))cmd(unassert indexcomponent,indexcomponent(tuple(relvarname(esc1)indexname(loc1esc1)ordinal(10)sp_expression(str1))))
Reply   : 

Request : cmd(unassert storagespace,storagespace(tuple(filename(esc1a.spdb)extentscount(2)pagecount(20)storagespaceid(1))tuple(filename(esc1a.spdb)extentscount(2)pagecount(20)storagespaceid(2))))cmd(unassert dataspace,dataspace(tuple(filename(esc1a.spdb)storagespaceid(1)gapcompressionthreshold(5)maximumgaps(9))))cmd(unassert dbmsfile,dbmsfile(tuple(filename(esc1a.spdb)pagesize(16384)))))cmd(unassert multihashingindexspace,multihashingindexspace(tuple(filename(esc1a.spdb)storagespaceid(2)gapcompressionthreshold(5)maximumgaps(9))))
Reply   : 

Request : cmd(unassert relvar,relvar(tuple(relvarname(esc1)relvarpredicate(record with str1 and str2.))))cmd(unassert relvarattribute,relvarattribute(tuple(relvarname(esc1)attributename(str1))tuple(relvarname(esc1)attributename(str2))))
Reply   : 

Request : cmd(unassert attribute,semiminus(attribute(tuple(attributename(str1)typename(string))tuple(attributename(str2)typename(string))),relvarattribute))cmd(unassert attributelogicallength,semiminus(attributelogicallength(tuple(attributename(str1)logicallength(12))tuple(attributename(str2)logicallength(16))),relvarattribute))
Reply   : 
END
