Mercurial > hg > monetdb-java
diff 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 |
line wrap: on
line diff
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @@ -3108,8 +3108,8 @@ public class MonetDatabaseMetaData "JOIN \"sys\".\"schemas\" s ON t.\"schema_id\" = s.\"id\" " + "JOIN \"sys\".\"objects\" o ON i.\"id\" = o.\"id\" " + "JOIN \"sys\".\"columns\" c ON (t.\"id\" = c.\"table_id\" AND o.\"name\" = c.\"name\") " + - "LEFT OUTER JOIN \"sys\".\"keys\" k ON (i.\"name\" = k.\"name\" AND i.\"table_id\" = k.\"table_id\") " + - "WHERE (k.\"type\" IS NULL OR k.\"type\" IN (1" + (unique ? "" : ",0") + "))"); // primary keys are 0, unique keys are 1 + "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 + "WHERE 1 = 1"); if (catalog != null && !catalog.isEmpty()) { // non-empty catalog selection.