Source

htsql / test / input / translation.yaml

Diff from to

test/input/translation.yaml

 #
 
 title: Edge Cases of HTSQL-to-SQL Translation
-id: translation
+suite: translation
 tests:
 
 # FIXME: update and refurbish!
     - uri: /count(school?exists(department))
     - uri: /{exists(school?!exists(department)),
              count(school?!exists(department))}
-      ifndef: oracle # Oracle cannot handle EXISTS and an aggregate in
+      unless: oracle # Oracle cannot handle EXISTS and an aggregate in
                      # the same SELECT clause.
     - uri: /{count(course),min(course.credits),
                            max(course.credits),
                            avg(course.credits)}
     - uri: /{count(school),count(department),count(course)}
     - uri: /{count(department),count(department?exists(course))}
-      ifndef: mssql # MSSQL does not allow an aggregate to contain
+      unless: mssql # MSSQL does not allow an aggregate to contain
                     # an EXISTS subquery.
     - uri: /school{code, campus, exists(department?count(course)>20),
                                  exists(program?count(student)>10)}
     # MSSQL does not allow the argument of an aggregate to contain
     # a subquery.
     - uri: /school{*,count(department.exists(course))}
-      ifndef: mssql
+      unless: mssql
     - uri: /school{code,count(department),count(program)}
     - uri: /school{code,exists(department),exists(program)}
     # Signular unit with a plural base flow.
     - uri: /course{department.code,no,credits}?credits=max(fork(department_code).credits)
     - uri: /department.course{department.code,no,credits}?credits=max(fork().credits)
     - uri: /course{department.code,no,credits,count(class)}?credits=max(fork(exists(class)).credits)
-      ifndef: [oracle, mssql] # subqueries are not permitted in the GROUP BY clause
+      unless: [oracle, mssql] # subqueries are not permitted in the GROUP BY clause
     - uri: /course{department.code,no,credits,count(class)}?credits=max(fork(count(class)).credits)
     - uri: /program{school_code,code,count(student)}?count(student)>avg(fork().count(student))
     - uri: /program{school_code,code,count(student)}?count(student)>avg(fork(school_code).count(student))
       expect: 400
     - uri: /class^{year, season}
                 {*, /top(^.sort(count(enrollment)-),3).course{title}}
-      ifndef: sqlite    # Too slow.
+      unless: sqlite    # Too slow.
     # parsing a command after an infix function call
     - uri: /school:top/:csv
 
     - uri: /(program.sort(count(student))^degree).^
                 {*, count(student)}
     - uri: /program^degree{*, exists(^), count(^)}
-      ifndef: oracle # Oracle cannot handle EXISTS and an aggregate in
+      unless: oracle # Oracle cannot handle EXISTS and an aggregate in
                      # the same SELECT clause.
     - uri: /school{code, count(program), count(distinct(program{degree}))}
     - uri: /school{code, count(program), count(program^degree)}
   # In PostgreSQL, SUM(int) => bigint, SUM(bigint) => decimal,
   # but HTSQL expects an integer (FIXED?)
   - uri: /sum(department.sum(course.credits))
-    ifdef: pgsql
+    if: pgsql
   # Oracle does not permit correlated subqueries in the same frame
   # with aggregates.
   - uri: /{count(school), exists(school)}
-    ifdef: oracle
+    if: oracle
     expect: 409
     ignore: true
   # MS SQL Server does not permit the argument of an aggregate to
   # contain a subquery.
   - uri: /count(school.exists(department))
-    ifdef: mssql
+    if: mssql
     expect: 409
     ignore: true