Changeset: 09efc00af83b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=09efc00af83b
Modified Files:
        clients/odbc/driver/SQLTables.c
Branch: Jul2015
Log Message:

Adding support for filtering on tables types: MERGE TABLE, STREAM TABLE, REMOTE 
TABLE and REPLICA TABLE as strings
 in the SQLTables() function argument TableType. This was forgotten in 
changeset 91643b6a257e
(grafted from cf83dfcee3ccca062c636deffeffbc88d0144245)


diffs (36 lines):

diff --git a/clients/odbc/driver/SQLTables.c b/clients/odbc/driver/SQLTables.c
--- a/clients/odbc/driver/SQLTables.c
+++ b/clients/odbc/driver/SQLTables.c
@@ -311,20 +311,27 @@ MNDBTables(ODBCStmt *stmt,
                                        }
                                        buf[j] = 0;
                                        if (strcmp(buf, "VIEW") == 0) {
-                                               strcpy(query_end,
-                                                      "t.type = 1 or ");
+                                               strcpy(query_end, "t.type = 1 
or ");
                                        } else if (strcmp(buf, "TABLE") == 0) {
                                                strcpy(query_end,
                                                       "(t.type = 0 and 
t.system = false and t.temporary = 0 and s.name <> 'tmp') or ");
-                                       } else if (strcmp(buf, "GLOBAL 
TEMPORARY") == 0) {
-                                               strcpy(query_end,
-                                                      "(t.type = 20 and 
t.system = false and t.temporary = 1 and s.name = 'tmp') or ");
+                                       } else if (strcmp(buf, "MERGE TABLE") 
== 0) {
+                                               strcpy(query_end, "t.type = 3 
or ");
+                                       } else if (strcmp(buf, "STREAM TABLE") 
== 0) {
+                                               strcpy(query_end, "t.type = 4 
or ");
+                                       } else if (strcmp(buf, "REMOTE TABLE") 
== 0) {
+                                               strcpy(query_end, "t.type = 5 
or ");
+                                       } else if (strcmp(buf, "REPLICA TABLE") 
== 0) {
+                                               strcpy(query_end, "t.type = 6 
or ");
                                        } else if (strcmp(buf, "SYSTEM TABLE") 
== 0) {
                                                strcpy(query_end,
                                                       "(t.type = 10 and 
t.system = true and t.temporary = 0) or ");
                                        } else if (strcmp(buf, "SYSTEM VIEW") 
== 0) {
                                                strcpy(query_end,
                                                       "(t.type = 11 and 
t.system = true and t.temporary = 0) or ");
+                                       } else if (strcmp(buf, "GLOBAL 
TEMPORARY") == 0) {
+                                               strcpy(query_end,
+                                                      "(t.type = 20 and 
t.system = false and t.temporary = 1 and s.name = 'tmp') or ");
                                        } else if (strcmp(buf, "LOCAL 
TEMPORARY") == 0) {
                                                strcpy(query_end,
                                                       "(t.type = 30 and 
t.system = false and t.temporary = 1) or ");
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to