id: htsql-regression-tests tests: - id: setup tests: [] - include: test/regress/functions.yaml output: id: functions,-datatypes-and-operators tests: - id: function-tests tests: - uri: /{1|0} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------+- | (1|0) | -+-------+- | true | ----- /{(1|0)}/ (1 row) - uri: /{!(1|0)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------+- | (!(1|0)) | -+----------+- | false | ----- /{(!(1|0))}/ (1 row) - uri: /{2+2} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------+- | (2+2) | -+-------+- | 4 | ----- /{(2+2)}/ (1 row) - uri: /{10 div 3, 10 mod 3} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------+- | div(10, 3) | mod(10, 3) | -+------------+------------+- | 3 | 1 | ----- /{div(10,3),mod(10,3)}/ (1 row) - uri: /{div(10,3), mod(10,3)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------+- | div(10, 3) | mod(10, 3) | -+------------+------------+- | 3 | 1 | ----- /{div(10,3),mod(10,3)}/ (1 row) - uri: /{100 div 10, 2 "+" 2, 6 bitwise_or 8, 123.345 round 1, 'htsql'{1 substr 3}} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------------------------------------------------+- | div(100, 10) | "+"(2, 2) | bitwise_or(6, 8) | round(123.345, 1) | 'htsql'{substr(1, 3)} | -+--------------+-----------+------------------+-------------------+-----------------------+- | 10 | 4 | 14 | 123.3 | tsq | ----- /{div(100,10),"+"(2,2),bitwise_or(6,8),round(123.345,1),'htsql'{substr(1,3)}}/ (1 row) - uri: /{null()==null()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------+- | (null()==null()) | -+------------------+- | true | ----- /{(null()==null())}/ (1 row) - uri: /{2+null()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------+- | (2+null()) | -+------------+- | | ----- /{(2+null())}/ (1 row) - uri: /{'hi'+null()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------+- | ('hi'+null()) | -+---------------+- | | ----- /{('hi'+null())}/ (1 row) - uri: /{string('2')+2=4,2+string('2')=4,string('2')+string('2')='22'} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------------------------------------------------------+- | ((string('2')+2)=4) | ((2+string('2'))=4) | ((string('2')+string('2'))='22') | -+---------------------+---------------------+----------------------------------+- | true | true | true | ----- /{((string('2')+2)=4),((2+string('2'))=4),((string('2')+string('2'))='22')}/ (1 row) - uri: /{string('2')*2=4,2*string('2')=4,string('2') div 2=1} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------------------------------------------+- | ((string('2')*2)=4) | ((2*string('2'))=4) | (div(string('2'), 2)=1) | -+---------------------+---------------------+-------------------------+- | true | true | true | ----- /{((string('2')*2)=4),((2*string('2'))=4),(div(string('2'),2)=1)}/ (1 row) - uri: /{+string('2')=-string('-2')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------+- | ((+string('2'))=(-string('-2'))) | -+----------------------------------+- | true | ----- /{((+string('2'))=(-string('-2')))}/ (1 row) - uri: /{true()&false()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------+- | (true()&false()) | -+------------------+- | false | ----- /{(true()&false())}/ (1 row) - uri: /{false()|true()|false()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------+- | (false()|true()|false()) | -+--------------------------+- | true | ----- /{(false()|true()|false())}/ (1 row) - uri: /{1&'false'&true()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------+- | (1&'false'&true()) | -+--------------------+- | false | ----- /{(1&'false'&true())}/ (1 row) - uri: /{false()->false(),false()->true(), true()->false(),true()->true()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------------------------------------+- | (false()->false()) | (false()->true()) | (true()->false()) | (true()->true()) | -+--------------------+-------------------+-------------------+------------------+- | true | true | false | true | ----- /{(false()->false()),(false()->true()),(true()->false()),(true()->true())}/ (1 row) - uri: /{true()|true()->false(),true()|(true()->false()), (true()|true())->false()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------------------------------------------------------------------+- | (true()|(true()->false())) | (true()|(true()->false())) | ((true()|true())->false()) | -+----------------------------+----------------------------+----------------------------+- | true | true | false | ----- /{(true()|(true()->false())),(true()|(true()->false())),((true()|true())->false())}/ (1 row) - uri: /{false()->true()&false(),(false()->true())&false(), false()->(true()&false())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------------------------------------------------+- | ((false()->true())&false()) | ((false()->true())&false()) | (false()->(true()&false())) | -+-----------------------------+-----------------------------+-----------------------------+- | false | false | true | ----- /{((false()->true())&false()),((false()->true())&false()),(false()->(true()&false()))}/ (1 row) - uri: /{!true()->!false(),(!true())->(!false()), !(true()->!false())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------------------------------------+- | ((!true())->(!false())) | ((!true())->(!false())) | (!(true()->(!false()))) | -+-------------------------+-------------------------+-------------------------+- | true | true | false | ----- /{((!true())->(!false())),((!true())->(!false())),(!(true()->(!false())))}/ (1 row) - uri: /{!true()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------+- | (!true()) | -+-----------+- | false | ----- /{(!true())}/ (1 row) - uri: /{'foo'='bar'} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------+- | ('foo'='bar') | -+---------------+- | false | ----- /{('foo'='bar')}/ (1 row) - uri: /{2+2!=5} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------+- | ((2+2)!=5) | -+------------+- | true | ----- /{((2+2)!=5)}/ (1 row) - uri: /{'x'='X'} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------+- | ('x'='X') | -+-----------+- | false | ----- /{('x'='X')}/ (1 row) - uri: /{1<2,2<=1} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------+- | (1<2) | (2<=1) | -+-------+--------+- | true | false | ----- /{(1<2),(2<=1)}/ (1 row) - uri: /{(-1)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------+- | (-1) | -+------+- | -1 | ----- /{(-1)}/ (1 row) - uri: /{is_null(null()),is_null(3),is_null('x')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------------------+- | is_null(null()) | is_null(3) | is_null('x') | -+-----------------+------------+--------------+- | true | false | false | ----- /{is_null(null()),is_null(3),is_null('x')}/ (1 row) - uri: /{is_true(true()),is_true(false()),is_true(null())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------------------------------+- | is_true(true()) | is_true(false()) | is_true(null()) | -+-----------------+------------------+-----------------+- | true | false | false | ----- /{is_true(true()),is_true(false()),is_true(null())}/ (1 row) - uri: /{is_false(true()),is_false(false()),is_false(null())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------------------------------+- | is_false(true()) | is_false(false()) | is_false(null()) | -+------------------+-------------------+------------------+- | false | true | false | ----- /{is_false(true()),is_false(false()),is_false(null())}/ (1 row) - uri: /{coalesce(1, null(), '2', '3')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------+- | coalesce(1, null(), '2', '3') | -+-------------------------------+- | 1 | ----- /{coalesce(1,null(),'2','3')}/ (1 row) - uri: /{number(string('123.456')),integer(string('123'))} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------------+- | number(string('123.456')) | integer(string('123')) | -+---------------------------+------------------------+- | 123.456 | 123 | ----- /{number(string('123.456')),integer(string('123'))}/ (1 row) - uri: /{integer(true()),integer(false())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------------+- | integer(true()) | integer(false()) | -+-----------------+------------------+- | 1 | 0 | ----- /{integer(true()),integer(false())}/ (1 row) - uri: /{abs(-17.4),ceil(-42.8)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------+- | abs((-17.4)) | ceil((-42.8)) | -+--------------+---------------+- | 17.4 | -42 | ----- /{abs((-17.4)),ceil((-42.8))}/ (1 row) - uri: /{degrees(0.5),exp(1.0),floor(-42.8),ln(2.0)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------------------------------------------------------+- | degrees(0.5) | exp(1.0) | floor((-42.8)) | ln(2.0) | -+---------------+--------------------+----------------+--------------------+- | 28.6478897565 | 2.7182818284590452 | -43 | 0.6931471805599453 | ----- /{degrees(0.5),exp(1.0),floor((-42.8)),ln(2.0)}/ (1 row) - uri: /{log10(100.0),log(2.0,64.0),pi(),(9.0^3.0),radians(45.0)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------------------------------------------------------+- | log10(100.0) | log(2.0, 64.0) | pi() | (9.0^3.0) | radians(45.0) | -+--------------------+--------------------+---------------+----------------------+----------------+- | 2.0000000000000000 | 6.0000000000000000 | 3.14159265359 | 729.0000000000000000 | 0.785398163397 | ----- /{log10(100.0),log(2.0,64.0),pi(),(9.0^3.0),radians(45.0)}/ (1 row) - uri: /{round(42.4),round(42.4382,2),sign(-8.4),sqrt(2.0)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------------------------------------------------+- | round(42.4) | round(42.4382, 2) | sign((-8.4)) | sqrt(2.0) | -+-------------+-------------------+--------------+-------------------+- | 42 | 42.44 | -1 | 1.414213562373095 | ----- /{round(42.4),round(42.4382,2),sign((-8.4)),sqrt(2.0)}/ (1 row) - uri: /{trunc(42.8),trunc(42.4382,2)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------+- | trunc(42.8) | trunc(42.4382, 2) | -+-------------+-------------------+- | 42 | 42.43 | ----- /{trunc(42.8),trunc(42.4382,2)}/ (1 row) - uri: /{acos(1),asin(1),atan(0),atan2(1,10)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------------+- | acos(1) | asin(1) | atan(0) | atan2(1, 10) | -+---------+---------------+---------+-----------------+- | 0.0 | 1.57079632679 | 0.0 | 0.0996686524912 | ----- /{acos(1),asin(1),atan(0),atan2(1,10)}/ (1 row) - uri: /{cos(pi()*0.9),sin(pi()*0.9),cot(pi()*0.4),tan(pi()*0.4)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------------------------------+- | cos((pi()*0.9)) | sin((pi()*0.9)) | cot((pi()*0.4)) | tan((pi()*0.4)) | -+-----------------+-----------------+-----------------+-----------------+- | -0.951056516295 | 0.309016994375 | 0.324919696233 | 3.07768353718 | ----- /{cos((pi()*0.9)),sin((pi()*0.9)),cot((pi()*0.4)),tan((pi()*0.4))}/ (1 row) - uri: /{'ht'+'sql',('htsql').length()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------+- | ('ht'+'sql') | 'htsql'.length() | -+--------------+------------------+- | htsql | 5 | ----- /{('ht'+'sql'),'htsql'.length()}/ (1 row) - uri: /{'htsql'[2],'htsql'[1:4],'htsql'[2:], 'htsql'[:2],'htsql'[:]} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------------------------------------------------+- | 'htsql'[2] | 'htsql'[1:4] | 'htsql'[2:] | 'htsql'[:2] | 'htsql'[:] | -+------------+--------------+-------------+-------------+------------+- | s | tsq | sql | ht | htsql | ----- /{'htsql'[2],'htsql'[1:4],'htsql'[2:],'htsql'[:2],'htsql'[:]}/ (1 row) - uri: /{'XXX-YY-ZZZZ'[-4:], 'XXX-YY-ZZZZ'[-7:-5], 'XXX-YY-ZZZZ'[:-5], 'XXX-YY-ZZZZ'[4:-5]} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------------------------------------------------------------------------+- | 'XXX-YY-ZZZZ'[(-4):] | 'XXX-YY-ZZZZ'[(-7):(-5)] | 'XXX-YY-ZZZZ'[:(-5)] | 'XXX-YY-ZZZZ'[4:(-5)] | -+----------------------+--------------------------+----------------------+-----------------------+- | ZZZZ | YY | XXX-YY | YY | ----- /{'XXX-YY-ZZZZ'[(-4):],'XXX-YY-ZZZZ'[(-7):(-5)],'XXX-YY-ZZZZ'[:(-5)],'XXX-YY-ZZZZ'[4:(-5)]}/ (1 row) - uri: /{'htsql'.substr(2), 'htsql'.substr(1,3)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------------------+- | 'htsql'.substr(2) | 'htsql'.substr(1, 3) | -+-------------------+----------------------+- | sql | tsq | ----- /{'htsql'.substr(2),'htsql'.substr(1,3)}/ (1 row) - uri: /{'http'.overlay('sql',2),'postgresql'.overlay('ht',0,7)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------------------+- | 'http'.overlay('sql', 2) | 'postgresql'.overlay('ht', 0, 7) | -+--------------------------+----------------------------------+- | htsql | htsql | ----- /{'http'.overlay('sql',2),'postgresql'.overlay('ht',0,7)}/ (1 row) - uri: /{'htsql'.repeat(3)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------+- | 'htsql'.repeat(3) | -+-------------------+- | htsqlhtsqlhtsql | ----- /{'htsql'.repeat(3)}/ (1 row) - uri: /{'HtSql'.lower(),'HtSql'.upper()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------+- | 'HtSql'.lower() | 'HtSql'.upper() | -+-----------------+-----------------+- | htsql | HTSQL | ----- /{'HtSql'.lower(),'HtSql'.upper()}/ (1 row) - uri: /{' htsql'.ltrim(),'xxhtsql'.ltrim('x'), 'htsql '.rtrim(),'htsqlyy'.rtrim('y'), ' htsql '.trim(),'xxhtsqlyy'.trim('xy')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------------------------------------------------------------------------------------------+- | ' htsql'.ltrim() | 'xxhtsql'.ltrim('x') | 'htsql '.rtrim() | 'htsqlyy'.rtrim('y') | ' htsql '.trim() | 'xxhtsqlyy'.trim('xy') | -+-------------------+----------------------+-------------------+----------------------+--------------------+------------------------+- | htsql | htsql | htsql | htsql | htsql | htsql | ----- /{' htsql'.ltrim(),'xxhtsql'.ltrim('x'),'htsql '.rtrim(),'htsqlyy'.rtrim('y'),' htsql '.trim(),'xxhtsqlyy'.trim('xy')}/ (1 row) - uri: /{'123'.lpad(5,'0'),'456'.rpad(6,'0')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------+- | '123'.lpad(5, '0') | '456'.rpad(6, '0') | -+--------------------+--------------------+- | 00123 | 456000 | ----- /{'123'.lpad(5,'0'),'456'.rpad(6,'0')}/ (1 row) - uri: /{'python'.translate('hnopy','slqh')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------+- | 'python'.translate('hnopy', 'slqh') | -+-------------------------------------+- | htsql | ----- /{'python'.translate('hnopy','slqh')}/ (1 row) - uri: /{'htsql'.contains('sql'),'htsql'.contains('http')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------------+- | 'htsql'.contains('sql') | 'htsql'.contains('http') | -+-------------------------+--------------------------+- | true | false | ----- /{'htsql'.contains('sql'),'htsql'.contains('http')}/ (1 row) - uri: /{'htsql'.position('sql'),'htsql'.position('http')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------------+- | 'htsql'.position('sql') | 'htsql'.position('http') | -+-------------------------+--------------------------+- | 2 | -1 | ----- /{'htsql'.position('sql'),'htsql'.position('http')}/ (1 row) - uri: /{'XSLT'.replace('XS','ht').replace('LT','sql')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------+- | 'XSLT'.replace('XS', 'ht').replace('LT', 'sql') | -+-------------------------------------------------+- | htsql | ----- /{'XSLT'.replace('XS','ht').replace('LT','sql')}/ (1 row) - uri: /{'htsql'.match('t.q'),'htsql'.match('q.t')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------------------+- | 'htsql'.match('t.q') | 'htsql'.match('q.t') | -+----------------------+----------------------+- | tsq | | ----- /{'htsql'.match('t.q'),'htsql'.match('q.t')}/ (1 row) - uri: /{'postgresql'.substitute('^.{7}','ht')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------+- | 'postgresql'.substitute('^.{7}', 'ht') | -+----------------------------------------+- | htsql | ----- /{'postgresql'.substitute('^.{7}','ht')}/ (1 row) - uri: /{'quoted label'.label(),'unquoted-label'.label(),'-''-'.label()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------------------------------------------------+- | 'quoted label'.label() | 'unquoted-label'.label() | '-''-'.label() | -+------------------------+--------------------------+----------------+- | 'quoted label' | unquoted-label | '-''-' | ----- /{'quoted label'.label(),'unquoted-label'.label(),'-''-'.label()}/ (1 row) - uri: /{(123).label(),(123.45).label()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------+- | 123.label() | 123.45.label() | -+-------------+----------------+- | 123 | '123.45' | ----- /{123.label(),123.45.label()}/ (1 row) - uri: /{date('2007-07-18'),date(date('2007-07-18')), string(date('2007-07-18')),date(2007,7,18)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------------------------------------------------------------------------+- | date('2007-07-18') | date(date('2007-07-18')) | string(date('2007-07-18')) | date(2007, 7, 18) | -+--------------------+--------------------------+----------------------------+-------------------+- | 2007-07-18 | 2007-07-18 | 2007-07-18 | 2007-07-18 | ----- /{date('2007-07-18'),date(date('2007-07-18')),string(date('2007-07-18')),date(2007,7,18)}/ (1 row) - uri: /{time('00:28'),time(time('12:28:57')), string(time('12:28:57.12Z')),time(12,29,0.56)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------------------------------------------------------------------------+- | time('00:28') | time(time('12:28:57')) | string(time('12:28:57.12Z')) | time(12, 29, 0.56) | -+---------------+------------------------+------------------------------+--------------------+- | 00:28:00 | 12:28:57 | 12:28:57.12 | 12:29:00.560000 | ----- /{time('00:28'),time(time('12:28:57')),string(time('12:28:57.12Z')),time(12,29,0.56)}/ (1 row) - uri: /{timetz('00:28'),timetz(time('12:28:57')),time(timetz('12:28:57+3')), string(timetz('12:28:57.12-02:00')),timetz(12,29,0.56), timetz(12,29,0,-5,0)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+- | timetz('00:28') | timetz(time('12:28:57')) | time(timetz('12:28:57+3')) | string(timetz('12:28:57.12-02:00')) | timetz(12, 29, 0.56) | timetz(12, 29, 0, (-5), 0) | -+-----------------+--------------------------+----------------------------+-------------------------------------+----------------------+----------------------------+- | 00:28:00 | 12:28:57 | 12:28:57 | 12:28:57.12-02 | 12:29:00.560000 | 12:29:00 | ----- /{timetz('00:28'),timetz(time('12:28:57')),time(timetz('12:28:57+3')),string(timetz('12:28:57.12-02:00')),timetz(12,29,0.56),timetz(12,29,0,(-5),0)}/ (1 row) - uri: /{datetime('2007-07-18'),datetime('2007-07-18 12:28:57')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------------------+- | datetime('2007-07-18') | datetime('2007-07-18 12:28:57') | -+------------------------+---------------------------------+- | 2007-07-18 00:00:00 | 2007-07-18 12:28:57 | ----- /{datetime('2007-07-18'),datetime('2007-07-18 12:28:57')}/ (1 row) - uri: /{date(datetime('2007-07-18 12:28:57')), time(datetime('2007-07-18 12:28:57')), string(datetime('2007-07-18T12:28:57'))} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------------------------------------------------------------------------------+- | date(datetime('2007-07-18 12:28:57')) | time(datetime('2007-07-18 12:28:57')) | string(datetime('2007-07-18T12:28:57')) | -+---------------------------------------+---------------------------------------+-----------------------------------------+- | 2007-07-18 | 12:28:57 | 2007-07-18 12:28:57 | ----- /{date(datetime('2007-07-18 12:28:57')),time(datetime('2007-07-18 12:28:57')),string(datetime('2007-07-18T12:28:57'))}/ (1 row) - uri: /{datetime(2007,07,18,12,28,57.2)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------------------+- | datetime(2007, 07, 18, 12, 28, 57.2) | -+--------------------------------------+- | 2007-07-18 12:28:57.200000 | ----- /{datetime(2007,07,18,12,28,57.2)}/ (1 row) - uri: /{timedelta('00:28'),timedelta('90 12:28:57'),timedelta('-7')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------------------------+- | timedelta('00:28') | timedelta('90 12:28:57') | timedelta('-7') | -+--------------------+--------------------------+-----------------+- | 00:28:00 | 90 12:28:57 | -7 | ----- /{timedelta('00:28'),timedelta('90 12:28:57'),timedelta('-7')}/ (1 row) - uri: /{string(timedelta('1000 12:28:07.12'))} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------------+- | string(timedelta('1000 12:28:07.12')) | -+---------------------------------------+- | 1000 12:28:07.12 | ----- /{string(timedelta('1000 12:28:07.12'))}/ (1 row) - uri: /{timedelta(25,12,29,0.56)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------+- | timedelta(25, 12, 29, 0.56) | -+-----------------------------+- | 25 12:29:00.560000 | ----- /{timedelta(25,12,29,0.56)}/ (1 row) - uri: /{date('2007-01-21'){year,month,day}} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------------------------------------------------------------+- | date('2007-01-21'){year} | date('2007-01-21'){month} | date('2007-01-21'){day} | -+--------------------------+---------------------------+-------------------------+- | 2007.0 | 1.0 | 21.0 | ----- /{date('2007-01-21'){year,month,day}}/ (1 row) - uri: /{datetime('2007-01-21 12:55:29.15'){year,month,day,hour,minute,second}} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+- | datetime('2007-01-21 12:55:29.15'){year} | datetime('2007-01-21 12:55:29.15'){month} | datetime('2007-01-21 12:55:29.15'){day} | datetime('2007-01-21 12:55:29.15'){hour} | datetime('2007-01-21 12:55:29.15'){minute} | datetime('2007-01-21 12:55:29.15'){second} | -+------------------------------------------+-------------------------------------------+-----------------------------------------+------------------------------------------+--------------------------------------------+--------------------------------------------+- | 2007.0 | 1.0 | 21.0 | 12.0 | 55.0 | 29.15 | ----- /{datetime('2007-01-21 12:55:29.15'){year,month,day,hour,minute,second}}/ (1 row) - uri: /{timedelta('5 12:15:08'){day,hour,minute,second}} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------------------------------------------------------------------------------------------+- | timedelta('5 12:15:08'){day} | timedelta('5 12:15:08'){hour} | timedelta('5 12:15:08'){minute} | timedelta('5 12:15:08'){second} | -+------------------------------+-------------------------------+---------------------------------+---------------------------------+- | 5.0 | 12.0 | 15.0 | 8.0 | ----- /{timedelta('5 12:15:08'){day,hour,minute,second}}/ (1 row) - uri: /{+timedelta('5 12:15'),-timedelta('-10')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------+- | (+timedelta('5 12:15')) | (-timedelta('-10')) | -+-------------------------+---------------------+- | 5 12:15:00 | 10 | ----- /{(+timedelta('5 12:15')),(-timedelta('-10'))}/ (1 row) - uri: /{date('2007-07-23')+7,7+date('2007-07-23')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------+- | (date('2007-07-23')+7) | (7+date('2007-07-23')) | -+------------------------+------------------------+- | 2007-07-30 | 2007-07-30 | ----- /{(date('2007-07-23')+7),(7+date('2007-07-23'))}/ (1 row) - uri: /{timedelta('3')+timedelta('12:15'),timedelta('3')+time('12:15')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------------------------------+- | (timedelta('3')+timedelta('12:15')) | (timedelta('3')+time('12:15')) | -+-------------------------------------+--------------------------------+- | 3 12:15:00 | 3 12:15:00 | ----- /{(timedelta('3')+timedelta('12:15')),(timedelta('3')+time('12:15'))}/ (1 row) - uri: /{datetime('2007-07-23 19:39')+timedelta('2 12:00'), date('2007-07-23')+time('12:39')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------------------------------------------------------------------+- | (datetime('2007-07-23 19:39')+timedelta('2 12:00')) | (date('2007-07-23')+time('12:39')) | -+-----------------------------------------------------+------------------------------------+- | 2007-07-26 07:39:00 | 2007-07-23 12:39:00 | ----- /{(datetime('2007-07-23 19:39')+timedelta('2 12:00')),(date('2007-07-23')+time('12:39'))}/ (1 row) - uri: /{date('2007-07-30')-date('2007-07-23'),date('2007-07-30')-7} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------------------------------------------+- | (date('2007-07-30')-date('2007-07-23')) | (date('2007-07-30')-7) | -+-----------------------------------------+------------------------+- | 7 | 2007-07-23 | ----- /{(date('2007-07-30')-date('2007-07-23')),(date('2007-07-30')-7)}/ (1 row) - uri: /{timedelta('3')-timedelta('12:15'),time('05:00')-time('03:15')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------------------------------------------+- | (timedelta('3')-timedelta('12:15')) | (time('05:00')-time('03:15')) | -+-------------------------------------+-------------------------------+- | 2 11:45:00 | 01:45:00 | ----- /{(timedelta('3')-timedelta('12:15')),(time('05:00')-time('03:15'))}/ (1 row) - uri: /{datetime('2007-07-23 19:39')-date('2007-07-23')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------------------------------------------------+- | (datetime('2007-07-23 19:39')-date('2007-07-23')) | -+---------------------------------------------------+- | 19:39:00 | ----- /{(datetime('2007-07-23 19:39')-date('2007-07-23'))}/ (1 row) - uri: /{datetime('2007-07-23 19:39')-timedelta('10'), datetime('2007-07-23 19:39')-time('20:00')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------------------------------------------------------+- | (datetime('2007-07-23 19:39')-timedelta('10')) | (datetime('2007-07-23 19:39')-time('20:00')) | -+------------------------------------------------+----------------------------------------------+- | 2007-07-13 19:39:00 | 2007-07-22 23:39:00 | ----- /{(datetime('2007-07-23 19:39')-timedelta('10')),(datetime('2007-07-23 19:39')-time('20:00'))}/ (1 row) - uri: /{(-1.5)*timedelta('-3'),time('12:15')*3} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------+- | ((-1.5)*timedelta('-3')) | (time('12:15')*3) | -+--------------------------+-------------------+- | 4 12:00:00 | 1 12:45:00 | ----- /{((-1.5)*timedelta('-3')),(time('12:15')*3)}/ (1 row) - uri: /{timedelta('3') div 2} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------+- | div(timedelta('3'), 2) | -+------------------------+- | 1 12:00:00 | ----- /{div(timedelta('3'),2)}/ (1 row) - uri: /{datetimetz('2007-07-18'),datetimetz('2007-07-18 12:28:57+5')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------------------------------------+- | datetimetz('2007-07-18') | datetimetz('2007-07-18 12:28:57+5') | -+---------------------------+-------------------------------------+- | 2007-07-18 00:00:00-08:00 | 2007-07-17 23:28:57-08:00 | ----- /{datetimetz('2007-07-18'),datetimetz('2007-07-18 12:28:57+5')}/ (1 row) - uri: /{date(datetimetz('2007-07-18 12:28:57+5')), timetz(datetimetz('2007-07-18 12:28:57+5')), string(datetimetz('2007-07-18T12:28:57+05:00'))} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------------------------------------------------------------------------------------------------+- | date(datetimetz('2007-07-18 12:28:57+5')) | timetz(datetimetz('2007-07-18 12:28:57+5')) | string(datetimetz('2007-07-18T12:28:57+05:00')) | -+-------------------------------------------+---------------------------------------------+-------------------------------------------------+- | 2007-07-17 | 23:28:57 | 2007-07-17 23:28:57-08 | ----- /{date(datetimetz('2007-07-18 12:28:57+5')),timetz(datetimetz('2007-07-18 12:28:57+5')),string(datetimetz('2007-07-18T12:28:57+05:00'))}/ (1 row) - uri: /{datetimetz(2007,07,18,12,28,57.2,-3)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------+- | datetimetz(2007, 07, 18, 12, 28, 57.2, (-3)) | -+----------------------------------------------+- | 2007-07-18 07:28:57.200000-08:00 | ----- /{datetimetz(2007,07,18,12,28,57.2,(-3))}/ (1 row) - uri: /{datetimetz('2007-01-21 12:55:29.15-02:30'){tz_hour,tz_minute}} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------------------------------------------------------------------+- | datetimetz('2007-01-21 12:55:29.15-02:30'){tz_hour} | datetimetz('2007-01-21 12:55:29.15-02:30'){tz_minute} | -+-----------------------------------------------------+-------------------------------------------------------+- | -8.0 | 0.0 | ----- /{datetimetz('2007-01-21 12:55:29.15-02:30'){tz_hour,tz_minute}}/ (1 row) - uri: /{string('\a\b\c\d\e')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------+- | string('\a\b\c\d\e') | -+----------------------+- | \a\b\c\d\e | ----- /{string('\a\b\c\d\e')}/ (1 row) - uri: /{array(1),array(true(),false()),array('one','two','three')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------------------------------------------------+- | array(1) | array(true(), false()) | array('one', 'two', 'three') | -+----------+------------------------+------------------------------+- | [1] | [true, false] | [one, two, three] | ----- /{array(1),array(true(),false()),array('one','two','three')}/ (1 row) - uri: /{array()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+---------+- | array() | -+---------+- | [] | ----- /{array()}/ (1 row) - uri: /{('xy'.repeat(500000)~'xx')}/select(timeout=0.001) status: 409 Conflict headers: - [Content-Type, text/plain; charset=UTF-8] body: | invalid data: canceling statement due to statement timeout at the position 31: /{('xy'.repeat(500000)~'xx')}/select(timeout=0.001) ^-------------------- - uri: /{timedelta('24:00')} status: 400 Bad Request headers: - [Content-Type, text/plain; charset=UTF-8] body: | invalid argument: type mismatch: invalid timedelta format: hour must be in 0..23 at the position 13: /{timedelta('24:00')} ^------ - uri: /{date('2007-12-32')} status: 400 Bad Request headers: - [Content-Type, text/plain; charset=UTF-8] body: | invalid argument: type mismatch: invalid date format: day is out of range for month at the position 8: /{date('2007-12-32')} ^----------- - uri: /{time('24:00')} status: 400 Bad Request headers: - [Content-Type, text/plain; charset=UTF-8] body: | invalid argument: type mismatch: invalid time format: hour must be in 0..23 at the position 8: /{time('24:00')} ^------ - uri: /{timetz('24:00+2')} status: 400 Bad Request headers: - [Content-Type, text/plain; charset=UTF-8] body: | invalid argument: type mismatch: invalid time format: hour must be in 0..23 at the position 10: /{timetz('24:00+2')} ^-------- - uri: /{3 div 0} status: 409 Conflict headers: - [Content-Type, text/plain; charset=UTF-8] body: | invalid data: division by zero at the position 1: /{3 div 0} ^--------- - uri: /{date('2007-01-01')+5.1} status: 400 Bad Request headers: - [Content-Type, text/plain; charset=UTF-8] body: | invalid argument: type mismatch: expected integer, but got number at the position 22: /{date('2007-01-01')+5.1} ^-- - uri: /{if('A'='B',false(),'C'='D',false(),true())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------------+- | if(('A'='B'), false(), ('C'='D'), false(), true()) | -+----------------------------------------------------+- | true | ----- /{if(('A'='B'),false(),('C'='D'),false(),true())}/ (1 row) - uri: /{if('A'='A',true(),'C'='D',false())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------+- | if(('A'='A'), true(), ('C'='D'), false()) | -+-------------------------------------------+- | true | ----- /{if(('A'='A'),true(),('C'='D'),false())}/ (1 row) - uri: /{if('A'='B',true(),'C'='D',false())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------+- | if(('A'='B'), true(), ('C'='D'), false()) | -+-------------------------------------------+- | | ----- /{if(('A'='B'),true(),('C'='D'),false())}/ (1 row) - uri: /{if(1=1,true(),1=0,false(),false())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+--------------------------------------------+- | if((1=1), true(), (1=0), false(), false()) | -+--------------------------------------------+- | true | ----- /{if((1=1),true(),(1=0),false(),false())}/ (1 row) - uri: /{switch(2+2,3,'three',4,'four',5,'five','infinity')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-------------------------------------------------------------+- | switch((2+2), 3, 'three', 4, 'four', 5, 'five', 'infinity') | -+-------------------------------------------------------------+- | four | ----- /{switch((2+2),3,'three',4,'four',5,'five','infinity')}/ (1 row) - uri: /{switch(true(),!true(),true())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+-----------------------------------+- | switch(true(), (!true()), true()) | -+-----------------------------------+- | | ----- /{switch(true(),(!true()),true())}/ (1 row) - uri: /{switch('x','a',1,'b',2,'c',3,0)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------+- | switch('x', 'a', 1, 'b', 2, 'c', 3, 0) | -+----------------------------------------+- | 0 | ----- /{switch('x','a',1,'b',2,'c',3,0)}/ (1 row) - uri: /{round(random()*1000)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+------------------------+- | round((random()*1000)) | -+------------------------+- | 572.0 | ----- /{round((random()*1000))}/ (1 row) - id: data-types-and-null-handling tests: - uri: /private_info{ethnicity,boolean(ethnicity)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | private_info | -+----------------------------------------+- | ethnicity | boolean(ethnicity) | -+-------------------+--------------------+- | [asian] | true | | [] | false | | [white] | true | | | false | | [black] | true | | [black, hispanic] | true | | [indian] | true | ----- /private_info{ethnicity,boolean(ethnicity)}/ (7 rows) - uri: /person?!email status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | person | -+-------------------------------------------------+- | org_id | nickname | full_name | email | -+-----------+----------+------------------+-------+- | lake-apts | tom | Tommy O'Mally | | | lakeside | amy | Amy S. Buckworth | | | smith | maggy | Margret N. Smith | "" | ----- /person?(!email)/ (3 rows) - uri: /person?email==null() status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | person | -+-------------------------------------------------+- | org_id | nickname | full_name | email | -+-----------+----------+------------------+-------+- | lake-apts | tom | Tommy O'Mally | | | lakeside | amy | Amy S. Buckworth | | ----- /person?(email==null())/ (2 rows) - include: test/regress/selection.yaml output: id: selection tests: - id: seive-selectors-and-predicates tests: - uri: /{count(organization),count(organization?project), count(organization?!project)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | | -+----------------------------------------------------------------------------------------+- | count(organization) | count((organization?project)) | count((organization?(!project))) | -+---------------------+-------------------------------+----------------------------------+- | 7 | 3 | 4 | ----- /{count(organization),count((organization?project)),count((organization?(!project)))}/ (1 row) - uri: /person{full_name,organization{name}?is_active}?nickname='jack' status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | person | -+-----------------------------------------------+- | full_name | organization{name}?is_active | -+----------------+------------------------------+- | Jack C. Meyers | Meyers Construction | | Jack Taupe | | ----- /person{full_name,organization{name}?is_active}?(nickname='jack')/ (2 rows) - uri: /organization{name, count(person?count(participation)<2)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+--------------------------------------------------------------------+- | name | count((person?(count(participation)<2))) | -+-------------------------+------------------------------------------+- | Acorn Architecture | 0 | | Lake Shore Apartments | 0 | | Lake Carmen Towers | 0 | | Lake Side Partners, LLC | 1 | | Meyers Construction | 0 | | Meyers Electric | 0 | | Rudgen, Taupe, & Smith | 2 | ----- /organization{name,count((person?(count(participation)<2)))}/ (7 rows) - uri: /organization?count(person?count(participation)<2)>1 status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-----------------------------------------------------------+- | org_id | name | is_active | division_of | -+--------+------------------------+-----------+-------------+- | smith | Rudgen, Taupe, & Smith | false | | ----- /organization?(count((person?(count(participation)<2)))>1)/ (1 row) - uri: /organization{name,person{array(full_name)}?!email} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-------------------------------------------------------------+- | name | person{array(full_name)}?(!email) | -+-------------------------+-----------------------------------+- | Acorn Architecture | [] | | Lake Shore Apartments | [Tommy O'Mally] | | Lake Carmen Towers | [] | | Lake Side Partners, LLC | [Amy S. Buckworth] | | Meyers Construction | [] | | Meyers Electric | [] | | Rudgen, Taupe, & Smith | [Margret N. Smith] | ----- /organization{name,person{array(full_name)}?(!email)}/ (7 rows) - uri: /organization{name, person{first(full_name),first(email)}?email} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+---------------------------------------------------------------------------------------+- | name | person{first(full_name)}?email | person{first(email)}?email | -+-------------------------+--------------------------------+----------------------------+- | Acorn Architecture | WATANABE Hideo | hideo.watanabe@example.com | | Lake Shore Apartments | | | | Lake Carmen Towers | | | | Lake Side Partners, LLC | David Jones | david.joines@example.com | | Meyers Construction | Jack C. Meyers | jack.meyers@example.com | | Meyers Electric | | | | Rudgen, Taupe, & Smith | Jack Taupe | jack.taupe@example.com | ----- /organization{name,person{first(full_name),first(email)}?email}/ (7 rows) - uri: /project{client{name^}?is_active,count()}?status='in-progress' status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | project | -+----------------------------------+- | client{name}?is_active | count() | -+------------------------+---------+- | Lake Carmen Towers | 1 | | | 1 | ----- /project{client{name^}?is_active,count()}?(status='in-progress')/ (2 rows) - uri: /organization?project?count(participation.billing_rate>35)>2 status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+----------------------------------------------------------------+- | org_id | name | is_active | division_of | -+-------------+------------------------+-----------+-------------+- | lake-apts | Lake Shore Apartments | false | lakeside | | lake-carmen | Lake Carmen Towers | true | lakeside | | smith | Rudgen, Taupe, & Smith | false | | ----- /organization?(project?(count((participation.billing_rate>35))>2))/ (3 rows) - uri: /organization{name,project{count(),max(start_date)}} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-----------------------------------------------------------------------+- | name | project{count()} | project{max(start_date)} | -+-------------------------+------------------+--------------------------+- | Acorn Architecture | 0 | | | Lake Shore Apartments | 2 | 2004-04-20 | | Lake Carmen Towers | 2 | 2006-11-23 | | Lake Side Partners, LLC | 0 | | | Meyers Construction | 0 | | | Meyers Electric | 0 | | | Rudgen, Taupe, & Smith | 3 | 2006-08-03 | ----- /organization{name,project{count(),max(start_date)}}/ (7 rows) - uri: /organization{org_id,count(person?email)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-------------------------------------+- | org_id | count((person?email)) | -+-------------+-----------------------+- | acorn | 1 | | lake-apts | 0 | | lake-carmen | 0 | | lakeside | 1 | | meyers | 3 | | meyers_elec | 0 | | smith | 2 | ----- /organization{org_id,count((person?email))}/ (7 rows) - uri: /organization{org_id,person{count()}?email} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-------------------------------------+- | org_id | person{count()}?email | -+-------------+-----------------------+- | acorn | 1 | | lake-apts | 0 | | lake-carmen | 0 | | lakeside | 1 | | meyers | 3 | | meyers_elec | 0 | | smith | 2 | ----- /organization{org_id,person{count()}?email}/ (7 rows) - uri: /organization{org_id,project{count()}?status='completed'} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-----------------------------------------------------+- | org_id | project{count()}?(status='completed') | -+-------------+---------------------------------------+- | acorn | 0 | | lake-apts | 2 | | lake-carmen | 0 | | lakeside | 0 | | meyers | 0 | | meyers_elec | 0 | | smith | 2 | ----- /organization{org_id,project{count()}?(status='completed')}/ (7 rows) - uri: /organization{org_id,count(project?status='completed')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-----------------------------------------------------+- | org_id | count((project?(status='completed'))) | -+-------------+---------------------------------------+- | acorn | 0 | | lake-apts | 2 | | lake-carmen | 0 | | lakeside | 0 | | meyers | 0 | | meyers_elec | 0 | | smith | 2 | ----- /organization{org_id,count((project?(status='completed')))}/ (7 rows) - uri: /organization{id(),count(person?private_info.tax_ident='E32-3483')} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-------------------------------------------------------------------+- | id() | count((person?(private_info.tax_ident='E32-3483'))) | -+-------------+-----------------------------------------------------+- | acorn | 1 | | lake-apts | 0 | | lake-carmen | 0 | | lakeside | 0 | | meyers | 0 | | meyers_elec | 0 | | smith | 0 | ----- /organization{id(),count((person?(private_info.tax_ident='E32-3483')))}/ (7 rows) - uri: /organization{org_id,project{count()}?count(participation)>2} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+---------------------------------------------------------+- | org_id | project{count()}?(count(participation)>2) | -+-------------+-------------------------------------------+- | acorn | 0 | | lake-apts | 2 | | lake-carmen | 1 | | lakeside | 0 | | meyers | 0 | | meyers_elec | 0 | | smith | 3 | ----- /organization{org_id,project{count()}?(count(participation)>2)}/ (7 rows) - uri: /organization{org_id,count(project?count(participation)>2)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+---------------------------------------------------------+- | org_id | count((project?(count(participation)>2))) | -+-------------+-------------------------------------------+- | acorn | 0 | | lake-apts | 2 | | lake-carmen | 1 | | lakeside | 0 | | meyers | 0 | | meyers_elec | 0 | | smith | 3 | ----- /organization{org_id,count((project?(count(participation)>2)))}/ (7 rows) - id: frame-tests tests: - uri: /organization{org_id,name} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+---------------------------------------+- | org_id | name | -+-------------+-------------------------+- | acorn | Acorn Architecture | | lake-apts | Lake Shore Apartments | | lake-carmen | Lake Carmen Towers | | lakeside | Lake Side Partners, LLC | | meyers | Meyers Construction | | meyers_elec | Meyers Electric | | smith | Rudgen, Taupe, & Smith | ----- /organization{org_id,name}/ (7 rows) - uri: /project{prj_id,status,client.name} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | project | -+-------------------------------------------------+- | prj_id | status | client.name | -+----------+-------------+------------------------+- | la-102 | completed | Lake Shore Apartments | | la-334 | completed | Lake Shore Apartments | | lt-711 | planned | Lake Carmen Towers | | lt-802 | in-progress | Lake Carmen Towers | | overhead | in-progress | | | smak | abandoned | Rudgen, Taupe, & Smith | | smbl | completed | Rudgen, Taupe, & Smith | | smen | completed | Rudgen, Taupe, & Smith | ----- /project{prj_id,status,client.name}/ (8 rows) - uri: /person{organization.name,full_name}? private_info.tax_ident~'83'&organization.is_active status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | person | -+--------------------------------------+- | organization.name | full_name | -+---------------------+----------------+- | Acorn Architecture | WATANABE Hideo | | Meyers Construction | Jim Meyers | ----- /person{organization.name,full_name}?((private_info.tax_ident~'83')&organization.is_active)/ (2 rows) - uri: /organization{name,count(person)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-----------------------------------------+- | name | count(person) | -+-------------------------+---------------+- | Acorn Architecture | 1 | | Lake Shore Apartments | 1 | | Lake Carmen Towers | 0 | | Lake Side Partners, LLC | 2 | | Meyers Construction | 3 | | Meyers Electric | 0 | | Rudgen, Taupe, & Smith | 3 | ----- /organization{name,count(person)}/ (7 rows) - uri: /organization{name,count(person),count(project)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+----------------------------------------------------------+- | name | count(person) | count(project) | -+-------------------------+---------------+----------------+- | Acorn Architecture | 1 | 0 | | Lake Shore Apartments | 1 | 2 | | Lake Carmen Towers | 0 | 2 | | Lake Side Partners, LLC | 2 | 0 | | Meyers Construction | 3 | 0 | | Meyers Electric | 0 | 0 | | Rudgen, Taupe, & Smith | 3 | 3 | ----- /organization{name,count(person),count(project)}/ (7 rows) - uri: /!project?count(participation)>3/project{status^,count()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | project | -+-----------------------+- | status | count() | -+-------------+---------+- | abandoned | 1 | | completed | 2 | | in-progress | 1 | ----- /project{status^,count()}/ (3 rows) - uri: /project{status^,count()}?count(participation)>3 status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | project | -+-----------------------+- | status | count() | -+-------------+---------+- | abandoned | 1 | | completed | 2 | | in-progress | 1 | ----- /project{status^,count()}?(count(participation)>3)/ (3 rows) - uri: /project{status^,count(),count(participation)} ?count(participation)>3 status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | project | -+----------------------------------------------+- | status | count() | count(participation) | -+-------------+---------+----------------------+- | abandoned | 1 | 6 | | completed | 2 | 9 | | in-progress | 1 | 4 | ----- /project{status^,count(),count(participation)}?(count(participation)>3)/ (3 rows) - uri: /person{full_name, if(exists(participation), sum(participation.billing_rate) div count(participation), null())} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | person | -+------------------------------------------------------------------------------------------------------------------+- | full_name | if(exists(participation), div(sum(participation.billing_rate), count(participation)), null()) | -+------------------+-----------------------------------------------------------------------------------------------+- | WATANABE Hideo | 135.0000000000000000 | | Tommy O'Mally | | | Amy S. Buckworth | | | David Jones | | | Mark Thomas Hill | 58.5000000000000000 | | Jack C. Meyers | 57.6428571428571429 | | Jim Meyers | 61.6000000000000000 | | Jack Taupe | | | José N. Marteñes | | | Margret N. Smith | | ----- /person{full_name,if(exists(participation),div(sum(participation.billing_rate),count(participation)),null())}/ (10 rows) - uri: /organization{org_id}?project.status='completed' status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+---------------+- | org_id | -+---------------+- | lake-apts | | smith | ----- /organization{org_id}?(project.status='completed')/ (2 rows) - uri: /organization{org_id,count(project.status!='completed')} ?is_active&exists(person) status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-----------------------------------------------+- | org_id | count((project.status!='completed')) | -+--------+--------------------------------------+- | acorn | 0 | | meyers | 0 | ----- /organization{org_id,count((project.status!='completed'))}?(is_active&exists(person))/ (2 rows) - uri: /organization{org_id, count(person.participation.project=project.prj_id)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+--------------------------------------------------------------------+- | org_id | count((person.participation.project=project.prj_id)) | -+-------------+------------------------------------------------------+- | acorn | 0 | | lake-apts | 2 | | lake-carmen | 0 | | lakeside | 0 | | meyers | 0 | | meyers_elec | 0 | | smith | 4 | ----- /organization{org_id,count((person.participation.project=project.prj_id))}/ (7 rows) - uri: /organization{name,count(person)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-----------------------------------------+- | name | count(person) | -+-------------------------+---------------+- | Acorn Architecture | 1 | | Lake Shore Apartments | 1 | | Lake Carmen Towers | 0 | | Lake Side Partners, LLC | 2 | | Meyers Construction | 3 | | Meyers Electric | 0 | | Rudgen, Taupe, & Smith | 3 | ----- /organization{name,count(person)}/ (7 rows) - uri: /organization{name}?is_active/person{full_name} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | person | -+---------------------+------------------+- | name | full_name | -+---------------------+------------------+- | Acorn Architecture | WATANABE Hideo | | Lake Carmen Towers | | | Meyers Construction | Mark Thomas Hill | | | Jack C. Meyers | | | Jim Meyers | | Meyers Electric | | ----- /organization{name}?is_active/person{full_name}/ (4 rows) - uri: /organization{name}?count(project)>count(person) /person{full_name}?participation status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | person | -+-----------------------+---------------+- | name | full_name | -+-----------------------+---------------+- | Lake Shore Apartments | Tommy O'Mally | | Lake Carmen Towers | | ----- /organization{name}?(count(project)>count(person))/person{full_name}?participation/ (2 rows) - uri: /organization{name}?is_active/person{full_name} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | person | -+---------------------+------------------+- | name | full_name | -+---------------------+------------------+- | Acorn Architecture | WATANABE Hideo | | Lake Carmen Towers | | | Meyers Construction | Mark Thomas Hill | | | Jack C. Meyers | | | Jim Meyers | | Meyers Electric | | ----- /organization{name}?is_active/person{full_name}/ (4 rows) - id: array-tests tests: - uri: /organization{id(),count(person),array(person),array(person).length()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-----------------------------------------------------------------------------------------------+- | id() | count(person) | array(person) | array(person).length() | -+-------------+---------------+----------------------------------------+------------------------+- | acorn | 1 | [acorn.hideo] | 1 | | lake-apts | 1 | [lake-apts.tom] | 1 | | lake-carmen | 0 | [] | 0 | | lakeside | 2 | [lakeside.amy, lakeside.dave] | 2 | | meyers | 3 | [meyers.hill, meyers.jack, meyers.jim] | 3 | | meyers_elec | 0 | [] | 0 | | smith | 3 | [smith.jack, smith.jose, smith.maggy] | 3 | ----- /organization{id(),count(person),array(person),array(person).length()}/ (7 rows) - uri: /organization{id(),array(person),array(person)+array(person)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-------------------------------------------------------------------------------------------------------------------------------------+- | id() | array(person) | (array(person)+array(person)) | -+-------------+----------------------------------------+------------------------------------------------------------------------------+- | acorn | [acorn.hideo] | [acorn.hideo, acorn.hideo] | | lake-apts | [lake-apts.tom] | [lake-apts.tom, lake-apts.tom] | | lake-carmen | [] | [] | | lakeside | [lakeside.amy, lakeside.dave] | [lakeside.amy, lakeside.dave, lakeside.amy, lakeside.dave] | | meyers | [meyers.hill, meyers.jack, meyers.jim] | [meyers.hill, meyers.jack, meyers.jim, meyers.hill, meyers.jack, meyers.jim] | | meyers_elec | [] | [] | | smith | [smith.jack, smith.jose, smith.maggy] | [smith.jack, smith.jose, smith.maggy, smith.jack, smith.jose, smith.maggy] | ----- /organization{id(),array(person),(array(person)+array(person))}/ (7 rows) - uri: /organization{id(),count(person),boolean(array(person))} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+------------------------------------------------------+- | id() | count(person) | boolean(array(person)) | -+-------------+---------------+------------------------+- | acorn | 1 | true | | lake-apts | 1 | true | | lake-carmen | 0 | false | | lakeside | 2 | true | | meyers | 3 | true | | meyers_elec | 0 | false | | smith | 3 | true | ----- /organization{id(),count(person),boolean(array(person))}/ (7 rows) - uri: /organization{id(),array(person),array(person)[0],array(person)[1]} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+--------------------------------------------------------------------------------------------+- | id() | array(person) | array(person)[0] | array(person)[1] | -+-------------+----------------------------------------+------------------+------------------+- | acorn | [acorn.hideo] | acorn.hideo | | | lake-apts | [lake-apts.tom] | lake-apts.tom | | | lake-carmen | [] | | | | lakeside | [lakeside.amy, lakeside.dave] | lakeside.amy | lakeside.dave | | meyers | [meyers.hill, meyers.jack, meyers.jim] | meyers.hill | meyers.jack | | meyers_elec | [] | | | | smith | [smith.jack, smith.jose, smith.maggy] | smith.jack | smith.jose | ----- /organization{id(),array(person),array(person)[0],array(person)[1]}/ (7 rows) - uri: /organization{id(),array(person)[:],array(person)[1:],array(person)[:2]} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+------------------------------------------------------------------------------------------------------------------+- | id() | array(person)[:] | array(person)[1:] | array(person)[:2] | -+-------------+----------------------------------------+---------------------------+-------------------------------+- | acorn | [acorn.hideo] | [] | [acorn.hideo] | | lake-apts | [lake-apts.tom] | [] | [lake-apts.tom] | | lake-carmen | [] | | [] | | lakeside | [lakeside.amy, lakeside.dave] | [lakeside.dave] | [lakeside.amy, lakeside.dave] | | meyers | [meyers.hill, meyers.jack, meyers.jim] | [meyers.jack, meyers.jim] | [meyers.hill, meyers.jack] | | meyers_elec | [] | | [] | | smith | [smith.jack, smith.jose, smith.maggy] | [smith.jose, smith.maggy] | [smith.jack, smith.jose] | ----- /organization{id(),array(person)[:],array(person)[1:],array(person)[:2]}/ (7 rows) - uri: /organization{id(),array(person),array(person)[1:2],array(person)[1:1]} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+------------------------------------------------------------------------------------------------+- | id() | array(person) | array(person)[1:2] | array(person)[1:1] | -+-------------+----------------------------------------+--------------------+--------------------+- | acorn | [acorn.hideo] | [] | [] | | lake-apts | [lake-apts.tom] | [] | [] | | lake-carmen | [] | [] | [] | | lakeside | [lakeside.amy, lakeside.dave] | [lakeside.dave] | [] | | meyers | [meyers.hill, meyers.jack, meyers.jim] | [meyers.jack] | [] | | meyers_elec | [] | [] | [] | | smith | [smith.jack, smith.jose, smith.maggy] | [smith.jose] | [] | ----- /organization{id(),array(person),array(person)[1:2],array(person)[1:1]}/ (7 rows) - uri: /organization{id(),array(person),array(1),array(1,2,3)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+----------------------------------------------------------------------------------+- | id() | array(person) | array(1) | array(1, 2, 3) | -+-------------+----------------------------------------+----------+----------------+- | acorn | [acorn.hideo] | [1] | [1, 2, 3] | | lake-apts | [lake-apts.tom] | [1] | [1, 2, 3] | | lake-carmen | [] | [1] | [1, 2, 3] | | lakeside | [lakeside.amy, lakeside.dave] | [1] | [1, 2, 3] | | meyers | [meyers.hill, meyers.jack, meyers.jim] | [1] | [1, 2, 3] | | meyers_elec | [] | [1] | [1, 2, 3] | | smith | [smith.jack, smith.jose, smith.maggy] | [1] | [1, 2, 3] | ----- /organization{id(),array(person),array(1),array(1,2,3)}/ (7 rows) - uri: /private_info{ethnicity,ethnicity.length(),ethnicity[0],ethnicity[1]} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | private_info | -+----------------------------------------------------------------------+- | ethnicity | ethnicity.length() | ethnicity[0] | ethnicity[1] | -+-------------------+--------------------+--------------+--------------+- | [asian] | 1 | asian | | | [] | 0 | | | | [white] | 1 | white | | | | | | | | [black] | 1 | black | | | [black, hispanic] | 2 | black | hispanic | | [indian] | 1 | indian | | ----- /private_info{ethnicity,ethnicity.length(),ethnicity[0],ethnicity[1]}/ (7 rows) - uri: /op:project?status=any('completed','in-progress') status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | op:project | -+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+- | prj_id | name | status | client | start_date | description | -+----------+--------------------------------------+-------------+-------------+------------+--------------------------------------------------------------------------------------------------------+- | la-102 | Kitchen Remodel at 102 N. Ocean View | completed | lake-apts | 2004-03-27 | Completely gutting the ancient stuff in this otherwise pretty apartment | | la-334 | Siding / roof at 334 Ocean Blvd | completed | lake-apts | 2004-04-20 | Replace the siding and ancient roofing with vinyl stuff. | | lt-802 | Toaster Re-Do and Roof Leak | in-progress | lake-carmen | 2006-11-23 | Reworking Apt 802 to recover from a Toaster that caught fire. | | overhead | General Management Work | in-progress | | 2003-06-12 | Internal overhead, not attached to a particular client | | smbl | Smith Balcony Expansion | completed | smith | 2005-02-03 | An expansion of the Executive balcony at Rudgen, Taupe and Smith | | smen | Smith Entry and Waiting Room | completed | smith | 2005-08-09 | Restructuring of the entry way and waiting room to handle clients who have complained about the decor. | ----- /op:project?(status=any('completed','in-progress'))/ (6 rows) - uri: /op:project?status!=all('completed','in-progress') status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | op:project | -+---------------------------------------------------------------------------------------------------------------------------------------------+- | prj_id | name | status | client | start_date | description | -+--------+---------------------------------+-----------+-------------+------------+-----------------------------------------------------------+- | lt-711 | Updating Fire Escape | planned | lake-carmen | | Bringing the fire-escape up-to-code. No Participants Yet. | | smak | Smith Associate Window and Roof | abandoned | smith | 2006-08-03 | Upgrade Jack's office to have an alcove and a bay window. | ----- /op:project?(status!=all('completed','in-progress'))/ (2 rows) - uri: /op:project?status!=all('planned','abandoned') status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | op:project | -+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+- | prj_id | name | status | client | start_date | description | -+----------+--------------------------------------+-------------+-------------+------------+--------------------------------------------------------------------------------------------------------+- | la-102 | Kitchen Remodel at 102 N. Ocean View | completed | lake-apts | 2004-03-27 | Completely gutting the ancient stuff in this otherwise pretty apartment | | la-334 | Siding / roof at 334 Ocean Blvd | completed | lake-apts | 2004-04-20 | Replace the siding and ancient roofing with vinyl stuff. | | lt-802 | Toaster Re-Do and Roof Leak | in-progress | lake-carmen | 2006-11-23 | Reworking Apt 802 to recover from a Toaster that caught fire. | | overhead | General Management Work | in-progress | | 2003-06-12 | Internal overhead, not attached to a particular client | | smbl | Smith Balcony Expansion | completed | smith | 2005-02-03 | An expansion of the Executive balcony at Rudgen, Taupe and Smith | | smen | Smith Entry and Waiting Room | completed | smith | 2005-08-09 | Restructuring of the entry way and waiting room to handle clients who have complained about the decor. | ----- /op:project?(status!=all('planned','abandoned'))/ (6 rows) - uri: /op:project?status!=all('planned','abandoned')&client.org_id~'lake' status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | op:project | -+------------------------------------------------------------------------------------------------------------------------------------------------------------------+- | prj_id | name | status | client | start_date | description | -+--------+--------------------------------------+-------------+-------------+------------+-------------------------------------------------------------------------+- | la-102 | Kitchen Remodel at 102 N. Ocean View | completed | lake-apts | 2004-03-27 | Completely gutting the ancient stuff in this otherwise pretty apartment | | la-334 | Siding / roof at 334 Ocean Blvd | completed | lake-apts | 2004-04-20 | Replace the siding and ancient roofing with vinyl stuff. | | lt-802 | Toaster Re-Do and Roof Leak | in-progress | lake-carmen | 2006-11-23 | Reworking Apt 802 to recover from a Toaster that caught fire. | ----- /op:project?((status!=all('planned','abandoned'))&(client.org_id~'lake'))/ (3 rows) - uri: /organization{id(),array(person.full_name)[0][:10]} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+-----------------------------------------------+- | id() | array(person.full_name)[0][:10] | -+-------------+---------------------------------+- | acorn | WATANABE H | | lake-apts | Tommy O'Ma | | lake-carmen | | | lakeside | Amy S. Buc | | meyers | Jack C. Me | | meyers_elec | | | smith | Jack Taupe | ----- /organization{id(),array(person.full_name)[0][:10]}/ (7 rows) - id: identity-and-join-tests tests: - uri: /op:person status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | op:person | -+----------------------------------------------------------------------+- | org_id | nickname | full_name | email | -+-----------+----------+------------------+----------------------------+- | acorn | hideo | WATANABE Hideo | hideo.watanabe@example.com | | lake-apts | tom | Tommy O'Mally | | | lakeside | amy | Amy S. Buckworth | | | lakeside | dave | David Jones | david.joines@example.com | | meyers | hill | Mark Thomas Hill | mark.hill@example.com | | meyers | jack | Jack C. Meyers | jack.meyers@example.com | | meyers | jim | Jim Meyers | jim.meyers@example.com | | smith | jack | Jack Taupe | jack.taupe@example.com | | smith | jose | José N. Marteñes | jose.martenes@example.com | | smith | maggy | Margret N. Smith | "" | ----- /op:person/ (10 rows) - uri: /op:person{id(),*} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | op:person | -+--------------------------------------------------------------------------------------+- | id() | org_id | nickname | full_name | email | -+---------------+-----------+----------+------------------+----------------------------+- | acorn.hideo | acorn | hideo | WATANABE Hideo | hideo.watanabe@example.com | | lake-apts.tom | lake-apts | tom | Tommy O'Mally | | | lakeside.amy | lakeside | amy | Amy S. Buckworth | | | lakeside.dave | lakeside | dave | David Jones | david.joines@example.com | | meyers.hill | meyers | hill | Mark Thomas Hill | mark.hill@example.com | | meyers.jack | meyers | jack | Jack C. Meyers | jack.meyers@example.com | | meyers.jim | meyers | jim | Jim Meyers | jim.meyers@example.com | | smith.jack | smith | jack | Jack Taupe | jack.taupe@example.com | | smith.jose | smith | jose | José N. Marteñes | jose.martenes@example.com | | smith.maggy | smith | maggy | Margret N. Smith | "" | ----- /op:person{id(),*}/ (10 rows) - uri: /project{id(),client.id()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | project | -+------------------------+- | id() | client.id() | -+----------+-------------+- | la-102 | lake-apts | | la-334 | lake-apts | | lt-711 | lake-carmen | | lt-802 | lake-carmen | | overhead | | | smak | smith | | smbl | smith | | smen | smith | ----- /project{id(),client.id()}/ (8 rows) - uri: /organization{id(),division_of.id()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | organization | -+--------------------------------+- | id() | division_of.id() | -+-------------+------------------+- | acorn | | | lake-apts | lakeside | | lake-carmen | lakeside | | lakeside | | | meyers | | | meyers_elec | meyers | | smith | | ----- /organization{id(),division_of.id()}/ (7 rows) - uri: /participation{id(),*} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | participation | -+------------------------------------------------------------------+- | id() | project | billing_rate | person | -+------------------------+----------+--------------+---------------+- | la-102.(lake-apts.tom) | la-102 | | lake-apts.tom | | la-102.(lakeside.dave) | la-102 | | lakeside.dave | | la-102.(meyers.hill) | la-102 | 55.00 | meyers.hill | | la-102.(meyers.jack) | la-102 | 69.00 | meyers.jack | | la-102.(meyers.jim) | la-102 | 69.00 | meyers.jim | | la-334.(lake-apts.tom) | la-334 | | lake-apts.tom | | la-334.(lakeside.dave) | la-334 | | lakeside.dave | | la-334.(meyers.jack) | la-334 | 69.00 | meyers.jack | | la-334.(meyers.jim) | la-334 | 69.00 | meyers.jim | | lt-802.(lakeside.amy) | lt-802 | | lakeside.amy | | lt-802.(meyers.hill) | lt-802 | 55.00 | meyers.hill | | lt-802.(meyers.jack) | lt-802 | 69.00 | meyers.jack | | lt-802.(meyers.jim) | lt-802 | 69.00 | meyers.jim | | overhead.(meyers.jack) | overhead | 0.00 | meyers.jack | | smak.(acorn.hideo) | smak | 135.00 | acorn.hideo | | smak.(meyers.hill) | smak | 65.50 | meyers.hill | | smak.(meyers.jack) | smak | 65.50 | meyers.jack | | smak.(meyers.jim) | smak | 35.50 | meyers.jim | | smak.(smith.jack) | smak | | smith.jack | | smak.(smith.maggy) | smak | | smith.maggy | | smbl.(acorn.hideo) | smbl | 135.00 | acorn.hideo | | smbl.(meyers.jack) | smbl | 65.50 | meyers.jack | | smbl.(smith.maggy) | smbl | | smith.maggy | | smen.(meyers.jack) | smen | 65.50 | meyers.jack | | smen.(meyers.jim) | smen | 65.50 | meyers.jim | | smen.(smith.maggy) | smen | | smith.maggy | ----- /participation{id(),*}/ (26 rows) - uri: /participation{id(),_ppl_seq,_ppl_seq.id()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | participation | -+---------------------------------------------------+- | id() | _ppl_seq | _ppl_seq.id() | -+------------------------+----------+---------------+- | la-102.(lake-apts.tom) | 33 | lake-apts.tom | | la-102.(lakeside.dave) | 31 | lakeside.dave | | la-102.(meyers.hill) | 11 | meyers.hill | | la-102.(meyers.jack) | 10 | meyers.jack | | la-102.(meyers.jim) | 12 | meyers.jim | | la-334.(lake-apts.tom) | 33 | lake-apts.tom | | la-334.(lakeside.dave) | 31 | lakeside.dave | | la-334.(meyers.jack) | 10 | meyers.jack | | la-334.(meyers.jim) | 12 | meyers.jim | | lt-802.(lakeside.amy) | 32 | lakeside.amy | | lt-802.(meyers.hill) | 11 | meyers.hill | | lt-802.(meyers.jack) | 10 | meyers.jack | | lt-802.(meyers.jim) | 12 | meyers.jim | | overhead.(meyers.jack) | 10 | meyers.jack | | smak.(acorn.hideo) | 40 | acorn.hideo | | smak.(meyers.hill) | 11 | meyers.hill | | smak.(meyers.jack) | 10 | meyers.jack | | smak.(meyers.jim) | 12 | meyers.jim | | smak.(smith.jack) | 23 | smith.jack | | smak.(smith.maggy) | 21 | smith.maggy | | smbl.(acorn.hideo) | 40 | acorn.hideo | | smbl.(meyers.jack) | 10 | meyers.jack | | smbl.(smith.maggy) | 21 | smith.maggy | | smen.(meyers.jack) | 10 | meyers.jack | | smen.(meyers.jim) | 12 | meyers.jim | | smen.(smith.maggy) | 21 | smith.maggy | ----- /participation{id(),_ppl_seq,_ppl_seq.id()}/ (26 rows) - uri: /participation{id(),project.id(),person.id()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | participation | -+-------------------------------------------------------+- | id() | project.id() | person.id() | -+------------------------+--------------+---------------+- | la-102.(lake-apts.tom) | la-102 | lake-apts.tom | | la-102.(lakeside.dave) | la-102 | lakeside.dave | | la-102.(meyers.hill) | la-102 | meyers.hill | | la-102.(meyers.jack) | la-102 | meyers.jack | | la-102.(meyers.jim) | la-102 | meyers.jim | | la-334.(lake-apts.tom) | la-334 | lake-apts.tom | | la-334.(lakeside.dave) | la-334 | lakeside.dave | | la-334.(meyers.jack) | la-334 | meyers.jack | | la-334.(meyers.jim) | la-334 | meyers.jim | | lt-802.(lakeside.amy) | lt-802 | lakeside.amy | | lt-802.(meyers.hill) | lt-802 | meyers.hill | | lt-802.(meyers.jack) | lt-802 | meyers.jack | | lt-802.(meyers.jim) | lt-802 | meyers.jim | | overhead.(meyers.jack) | overhead | meyers.jack | | smak.(acorn.hideo) | smak | acorn.hideo | | smak.(meyers.hill) | smak | meyers.hill | | smak.(meyers.jack) | smak | meyers.jack | | smak.(meyers.jim) | smak | meyers.jim | | smak.(smith.jack) | smak | smith.jack | | smak.(smith.maggy) | smak | smith.maggy | | smbl.(acorn.hideo) | smbl | acorn.hideo | | smbl.(meyers.jack) | smbl | meyers.jack | | smbl.(smith.maggy) | smbl | smith.maggy | | smen.(meyers.jack) | smen | meyers.jack | | smen.(meyers.jim) | smen | meyers.jim | | smen.(smith.maggy) | smen | smith.maggy | ----- /participation{id(),project.id(),person.id()}/ (26 rows) - uri: /worklist{id(),prj_id,item_no.id(),prj_id.id()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | worklist | -+----------------------------------------------+- | id() | prj_id | item_no.id() | prj_id.id() | -+--------+--------+--------------+-------------+- | smak.3 | smak | smak.3 | smak | | smbl.3 | smbl | smbl.3 | smbl | | smen.3 | smen | smen.3 | smen | ----- /worklist{id(),prj_id,item_no.id(),prj_id.id()}/ (3 rows) - uri: /dependency{id(),of_item_no.id(), on_item_no.id()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | dependency | -+---------------------------------------------------------+- | id() | of_item_no.id() | on_item_no.id() | -+---------------------+-----------------+-----------------+- | (smbl.34).(smbl.33) | smbl.34 | smbl.33 | | (smbl.35).(smbl.34) | smbl.35 | smbl.34 | | (smbl.35).(smbl.36) | smbl.35 | smbl.36 | ----- /dependency{id(),of_item_no.id(),on_item_no.id()}/ (3 rows) - uri: /dependency{id(),of_prj_id.id(),on_prj_id.id()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | dependency | -+-------------------------------------------------------+- | id() | of_prj_id.id() | on_prj_id.id() | -+---------------------+----------------+----------------+- | (smbl.34).(smbl.33) | smbl | smbl | | (smbl.35).(smbl.34) | smbl | smbl | | (smbl.35).(smbl.36) | smbl | smbl | ----- /dependency{id(),of_prj_id.id(),on_prj_id.id()}/ (3 rows) - uri: /workitem{id(),prj_id,project.id(),prj_id.id()} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | workitem | -+-----------------------------------------------+- | id() | prj_id | project.id() | prj_id.id() | -+---------+--------+--------------+-------------+- | smak.1 | smak | smak | smak | | smak.2 | smak | smak | smak | | smak.3 | smak | smak | smak | | smak.4 | smak | smak | smak | | smak.5 | smak | smak | smak | | smbl.1 | smbl | smbl | smbl | | smbl.2 | smbl | smbl | smbl | | smbl.3 | smbl | smbl | smbl | | smbl.4 | smbl | smbl | smbl | | smbl.30 | smbl | smbl | smbl | | smbl.31 | smbl | smbl | smbl | | smbl.32 | smbl | smbl | smbl | | smbl.33 | smbl | smbl | smbl | | smbl.34 | smbl | smbl | smbl | | smbl.35 | smbl | smbl | smbl | | smbl.36 | smbl | smbl | smbl | | smen.1 | smen | smen | smen | | smen.2 | smen | smen | smen | | smen.3 | smen | smen | smen | | smen.4 | smen | smen | smen | ----- /workitem{id(),prj_id,project.id(),prj_id.id()}/ (20 rows) - uri: /project{id(),array(person)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | project | -+-----------------------------------------------------------------------------------------+- | id() | array(person) | -+----------+------------------------------------------------------------------------------+- | la-102 | [lake-apts.tom, lakeside.dave, meyers.hill, meyers.jack, meyers.jim] | | la-334 | [lake-apts.tom, lakeside.dave, meyers.jack, meyers.jim] | | lt-711 | [] | | lt-802 | [lakeside.amy, meyers.hill, meyers.jack, meyers.jim] | | overhead | [meyers.jack] | | smak | [acorn.hideo, meyers.hill, meyers.jack, meyers.jim, smith.jack, smith.maggy] | | smbl | [acorn.hideo, meyers.jack, smith.maggy] | | smen | [meyers.jack, meyers.jim, smith.maggy] | ----- /project{id(),array(person)}/ (8 rows) - uri: /person{id(),array(project)} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | person | -+----------------------------------------------------------------------+- | id() | array(project) | -+---------------+------------------------------------------------------+- | acorn.hideo | [smak, smbl] | | lake-apts.tom | [la-102, la-334] | | lakeside.amy | [lt-802] | | lakeside.dave | [la-102, la-334] | | meyers.hill | [la-102, lt-802, smak] | | meyers.jack | [la-102, la-334, lt-802, overhead, smak, smbl, smen] | | meyers.jim | [la-102, la-334, lt-802, smak, smen] | | smith.jack | [smak] | | smith.jose | [] | | smith.maggy | [smak, smbl, smen] | ----- /person{id(),array(project)}/ (10 rows) - uri: /person{organization{name+},full_name+} status: 200 OK headers: - [Content-Type, text/plain; charset=UTF-8] body: |2 | person | -+--------------------------------------------+- | organization{name} | full_name | -+-------------------------+------------------+- | Acorn Architecture | WATANABE Hideo | | Lake Shore Apartments | Tommy O'Mally | | Lake Side Partners, LLC | Amy S. Buckworth | | Lake Side Partners, LLC | David Jones | | Meyers Construction | Jack C. Meyers | | Meyers Construction | Jim Meyers | | Meyers Construction | Mark Thomas Hill | | R