Changeset: 99ff3cd9f4f0 for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/99ff3cd9f4f0 Modified Files: ChangeLog src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java Branch: default Log Message:
Corrected DatabaseMetaData method getStringFunctions() when connected to a Jun2023 server. It now includes the string functions from the new txtsim module. diffs (48 lines): diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog +* Thu May 4 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> +- Corrected DatabaseMetaData method getStringFunctions() when connected + to Jun2023 server. It now includes the string functions from the new + txtsim module. + * Thu Feb 23 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> - Compiled and released new jar files: monetdb-jdbc-3.3.jre8.jar and jdbcclient.jre8.jar diff --git a/src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java b/src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java --- a/src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java @@ -408,7 +408,7 @@ public final class MonetDatabaseMetaData * @return a String of query result values concatenated into one string, and values separated by comma's */ private String getConcatenatedStringFromQuery(final String query) { - final StringBuilder sb = new StringBuilder(1024); + final StringBuilder sb = new StringBuilder(1200); Statement st = null; ResultSet rs = null; try { @@ -432,7 +432,7 @@ public final class MonetDatabaseMetaData } finally { MonetConnection.closeResultsetStatement(rs, st); } - // for debug: System.out.println("SQL (len " + query.length() + "): " + query + "\nResult string: " + sb.toString()); + // for debug: System.out.println("SQL (len " + query.length() + "): " + query + "\nResult string(len " + sb.length() + "): " + sb.toString()); return sb.toString(); } @@ -464,8 +464,9 @@ public final class MonetDatabaseMetaData // exclude sql functions: get_value_for, next_value_for, restart " AND \"mod\" <> 'sql')" + // include specific functions code(int) and space(int) which belong to the 'str' module - " OR \"mod\" = 'str'" + - // include 3 specific json functions, md5(), ms_stuff() and udf reverse() which all accept a string arg + // include functions (difference, editdistance, editdistance2, levenshtein, qgramnormalize, similarity, soundex) which since Jun2023 are in the 'txtsim' module + " OR (\"mod\" IN ('str','txtsim') AND \"type\" = 1)" + + // include 3 specific json functions and md5(), ms_stuff() and udf reverse() which all accept a string arg " OR f.\"name\" IN ('isarray','isobject','isvalid','md5','ms_stuff','reverse')"; final String unionPart = // add functions which are not listed in sys.functions but implemented in the SQL parser (see sql/server/sql_parser.y) _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org