From 7ab58fa3b3f4752e14e0b4f19b5f3697edfd0f01 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 13 Apr 2009 19:53:53 -0500 Subject: [PATCH] add test for all features of select except where clauses --- extra/db2/fql/fql-tests.factor | 11 +++++++++++ extra/db2/fql/fql.factor | 2 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/extra/db2/fql/fql-tests.factor b/extra/db2/fql/fql-tests.factor index 6a6f782b1e..cb1bee24ca 100644 --- a/extra/db2/fql/fql-tests.factor +++ b/extra/db2/fql/fql-tests.factor @@ -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 ; diff --git a/extra/db2/fql/fql.factor b/extra/db2/fql/fql.factor index 78abc5ee0b..222135606e 100644 --- a/extra/db2/fql/fql.factor +++ b/extra/db2/fql/fql.factor @@ -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 )