Mercurial > hg > monetdb-java
changeset 268:ee4c826e3933
Extended method getNumericFunctions() by also returning functions: degrees, fuse, ms_round, ms_str, ms_trunc and radians.
Extended method getStringFunctions() by also returning function: position.
Updated ChangeLog.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 07 Mar 2019 18:56:55 +0100 (2019-03-07) |
parents | 43ea6c50483e |
children | 9c1ecdbbd9aa |
files | ChangeLog src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java |
diffstat | 2 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog +* Thu Mar 7 2019 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> +- Improved MonetDatabaseMetaData methods: + - getNumericFunctions(): it now includes functions: degrees, fuse, ms_round, ms_str, ms_trunc and radians. + - getStringFunctions(): it now includes function: position. + - supportsIntegrityEnhancementFacility() now returns false, as we do not enforce CHECK constraints yet. + * Thu Feb 7 2019 Martin van Dinther <martin.van.dinther@monetdbsolutions.com> - Improved MonetDatabaseMetaData methods: - getNumericFunctions(): it no longer lists aggregate functions: avg, prod and sum
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @@ -493,7 +493,8 @@ public class MonetDatabaseMetaData exten "('tinyint', 'smallint', 'int', 'bigint', 'hugeint', 'decimal', 'double', 'real') )" + " AND \"type\" = 1" + // only scalar functions // exclude functions which belong to the 'str' module - " AND \"mod\" <> 'str')"; // to filter out string functions: 'code' and 'space' + " AND \"mod\" <> 'str')" + // to filter out string functions: 'code' and 'space' + " OR \"name\" IN ('degrees','fuse','ms_round','ms_str','ms_trunc','radians')"; return getConcatenatedStringFromQuery(FunctionsSelect + FunctionsWhere + match + OrFunctionsMaxMin + FunctionsOrderBy1); } @@ -503,7 +504,10 @@ public class MonetDatabaseMetaData exten "('char', 'varchar', 'clob', 'json') )" + // include functions which belong to the 'str' module " OR \"mod\" = 'str')"; - return getConcatenatedStringFromQuery(FunctionsSelect + FunctionsWhere + match + OrFunctionsMaxMin + FunctionsOrderBy1); + String unionPart = + // add system functions which are not listed in sys.functions but implemented in the SQL parser (see sql/server/sql_parser.y) + " UNION SELECT 'position'"; + return getConcatenatedStringFromQuery(FunctionsSelect + FunctionsWhere + match + OrFunctionsMaxMin + unionPart + FunctionsOrderBy1); } @Override @@ -528,7 +532,7 @@ public class MonetDatabaseMetaData exten @Override public String getTimeDateFunctions() { String wherePart = - "\"mod\" = 'mtime' OR \"name\" IN ('epoch','localtime','localtimestamp')"; + "\"mod\" IN ('mtime','timestamp') OR \"name\" IN ('localtime','localtimestamp')"; String unionPart = // add time date functions which are not listed in sys.functions but implemented in the SQL parser (see sql/server/sql_parser.y) " UNION SELECT 'extract'" +