Mercurial > hg > monetdb-java
comparison src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @ 306:7c79ef41b840
Undo change cf372fae2adb. The problem was in the dump code in JdbcClient.
Improved the SQLExporter code which is used to dump a table or all tables in a schema.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Wed, 21 Aug 2019 17:05:55 +0200 (2019-08-21) |
parents | cf372fae2adb |
children | 8701024a9bb0 |
comparison
equal
deleted
inserted
replaced
305:e74123be951f | 306:7c79ef41b840 |
---|---|
3106 "FROM \"sys\".\"idxs\" i " + | 3106 "FROM \"sys\".\"idxs\" i " + |
3107 "JOIN \"sys\".\"tables\" t ON i.\"table_id\" = t.\"id\" " + | 3107 "JOIN \"sys\".\"tables\" t ON i.\"table_id\" = t.\"id\" " + |
3108 "JOIN \"sys\".\"schemas\" s ON t.\"schema_id\" = s.\"id\" " + | 3108 "JOIN \"sys\".\"schemas\" s ON t.\"schema_id\" = s.\"id\" " + |
3109 "JOIN \"sys\".\"objects\" o ON i.\"id\" = o.\"id\" " + | 3109 "JOIN \"sys\".\"objects\" o ON i.\"id\" = o.\"id\" " + |
3110 "JOIN \"sys\".\"columns\" c ON (t.\"id\" = c.\"table_id\" AND o.\"name\" = c.\"name\") " + | 3110 "JOIN \"sys\".\"columns\" c ON (t.\"id\" = c.\"table_id\" AND o.\"name\" = c.\"name\") " + |
3111 "LEFT OUTER JOIN \"sys\".\"keys\" k ON (i.\"name\" = k.\"name\" AND i.\"table_id\" = k.\"table_id\") " + | 3111 "LEFT OUTER JOIN \"sys\".\"keys\" k ON (i.\"name\" = k.\"name\" AND i.\"table_id\" = k.\"table_id\" AND k.\"type\" IN (0,1)) " + // primary (0) and unique keys (1) only |
3112 "WHERE (k.\"type\" IS NULL OR k.\"type\" IN (1" + (unique ? "" : ",0") + "))"); // primary keys are 0, unique keys are 1 | 3112 "WHERE 1 = 1"); |
3113 | 3113 |
3114 if (catalog != null && !catalog.isEmpty()) { | 3114 if (catalog != null && !catalog.isEmpty()) { |
3115 // non-empty catalog selection. | 3115 // non-empty catalog selection. |
3116 // as we do not support catalogs this always results in no rows returned | 3116 // as we do not support catalogs this always results in no rows returned |
3117 query.append(" AND 1 = 0"); | 3117 query.append(" AND 1 = 0"); |