Mercurial > hg > monetdb-java
comparison src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java @ 913:a8ca336e7f1a
supportsIntegrityEnhancementFacility() should return true when connected to Aug2024 (11.51) or higher servers.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 18 Jul 2024 19:45:23 +0200 (8 months ago) |
parents | cc6425e98017 |
children | 41d0cce6d2df |
comparison
equal
deleted
inserted
replaced
912:e85dcb3ea4a6 | 913:a8ca336e7f1a |
---|---|
936 * primary and foreign keys with the requirement that no foreign key row may be inserted or | 936 * primary and foreign keys with the requirement that no foreign key row may be inserted or |
937 * updated unless a matching primary key row exists. Check clauses allow specification of | 937 * updated unless a matching primary key row exists. Check clauses allow specification of |
938 * inter-column constraints to be maintained by the database system. | 938 * inter-column constraints to be maintained by the database system. |
939 * Default clauses provide optional default values for missing data. | 939 * Default clauses provide optional default values for missing data. |
940 * | 940 * |
941 * We currently do not supprt CHECK constraints (see bug 3568) nor deferrable FK constraints. | |
942 * | |
943 * @return true if so | 941 * @return true if so |
944 */ | 942 */ |
945 @Override | 943 @Override |
946 public boolean supportsIntegrityEnhancementFacility() { | 944 public boolean supportsIntegrityEnhancementFacility() { |
947 return false; | 945 // Starting with release Aug2024 (11.51.1) MonetDB now also supports CHECK constraints (ref issue 3335, 3568). |
946 try { | |
947 if ((con.getDatabaseMajorVersion() == 11) && (con.getDatabaseMinorVersion() >= 51)) | |
948 return true; | |
949 } catch (SQLException e) { /* ignore */ } | |
950 return false; // for older servers | |
948 } | 951 } |
949 | 952 |
950 /** | 953 /** |
951 * Is some form of outer join supported? | 954 * Is some form of outer join supported? |
952 * | 955 * |