Update of /cvsroot/monetdb/pathfinder/compiler/sql
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6691

Modified Files:
        sqlprint.c 
Log Message:
-- print guide_step as SQL



Index: sqlprint.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/sqlprint.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- sqlprint.c  16 Jul 2007 21:54:55 -0000      1.25
+++ sqlprint.c  25 Jul 2007 12:26:57 -0000      1.26
@@ -104,6 +104,8 @@
 static void print_schema_relcol (PFsql_t *);
 static void print_join (PFsql_t *);
 static void print_comment (PFsql_t *);
+static void print_lit_list (PFsql_t * n);
+
 
 static void
 print_comment (PFsql_t * n)
@@ -559,6 +561,14 @@
        sqlprintf ("%%')");
       }
       break;
+
+    case sql_in:
+        sqlprintf("(");
+        print_statement(n->child[0]);
+        sqlprintf(" IN (");
+        print_lit_list(n->child[1]);
+        sqlprintf("))");
+        break;
     default:
       {
        PFoops (OOPS_FATAL, "expression screwed up (%u)", n->kind);
@@ -1016,6 +1026,23 @@
     }
 }
 
+static void
+print_lit_list (PFsql_t * n)
+{
+  assert (n);
+
+  switch (n->kind)
+    {
+    case sql_lit_list:
+      print_lit_list (n->child[0]);
+      sqlprintf (", ");
+      print_lit_list (n->child[1]);
+      break;
+    default:
+      print_statement (n);
+    }
+}
+
 #if 0
 gcc:defined but never used static void
 print_loc_variable (PFsql_t * n)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to