]> gitweb.factorcode.org Git - factor.git/commitdiff
add test for all features of select except where clauses
authorDoug Coleman <erg@jobim.local>
Tue, 14 Apr 2009 00:53:53 +0000 (19:53 -0500)
committerDoug Coleman <erg@jobim.local>
Tue, 14 Apr 2009 00:53:53 +0000 (19:53 -0500)
extra/db2/fql/fql-tests.factor
extra/db2/fql/fql.factor

index 6a6f782b1e73e227c71b68a67c4a5ad242362d5f..cb1bee24ca25f3ede650956b9034f06e12345f11 100644 (file)
@@ -21,6 +21,17 @@ IN: db2.fql.tests
         expand-fql sql>>
     ] unit-test
     
+    [ "select name, os from computer group by os order by lol offset 100 limit 3" ]
+    [
+        select new
+            { "name" "os" } >>names
+            "computer" >>from
+            "os" >>group-by
+            "lol" >>order-by
+            100 >>offset
+            3 >>limit
+        expand-fql sql>>
+    ] unit-test
 
     ;
 
index 78abc5ee0b3f579ccf00967f4f3c2e98a6cd7aed..222135606e8fcd1d5ca6eca3f3f471d833f80ed5 100644 (file)
@@ -12,11 +12,9 @@ GENERIC: normalize-fql ( object -- sequence/fql-statement )
 
 ! M: object normalize-fql ;
 
-
 : ?1array ( obj -- array )
     dup string? [ 1array ] when ; inline
 
-
 TUPLE: insert into names values ;
 CONSTRUCTOR: insert ( into names values -- obj ) ;
 M: insert normalize-fql ( insert -- insert )