Changeset: eabbc5bf7cdb for monetdb-java
URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=eabbc5bf7cdb
Modified Files:
        ChangeLog
        src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
Branch: default
Log Message:

Corrected the return value of getCatalogTerm();


diffs (41 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 # ChangeLog file for monetdb-java
 # This file is updated with Maddlog
 
+* Wed Feb 19 2020 Martin van Dinther <[email protected]>
+- Corrected the return value of getCatalogTerm() to "cat".
+
 * Wed Feb 12 2020 Martin van Dinther <[email protected]>
 - As Java 7 is no longer supported we now compile for Java 8 as the
   minimum required JVM version (profile compact2).
diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java 
b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
@@ -953,14 +953,21 @@ public class MonetDatabaseMetaData
 
        /**
         * What is the database vendor's preferred term for "catalog"?
-        * MonetDB doesn't really have them (from driver accessible) but
-        * from the monetdb.conf file the term "database" sounds best
+        *
+        * MonetDB doesn't support the SQL catalog naming concept.
+        * Only SQL schemas are supported.
+        * We also do not allow the name of a database to be included in
+        * a fully qualified name, so we shouldn't return "database" here.
+        * A database is a different concept than an SQL catalog.
         *
         * @return the vendor term
         */
        @Override
        public String getCatalogTerm() {
-               return "database";
+               // MonetDB does NOT support catalogs, so also no catalog term
+               // Some generic SQL clients (e.g. DbVisualiser) use this string 
in their GUI
+               // To avoid NPE, just return an abrev string: "cat" (we like 
cats)
+               return "cat";
        }
 
        /**
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to