changeset 275:7d041f5c3fea

In getTimeDateFunctions() also return newly added SQL function: date_trunc
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 25 Apr 2019 18:14:15 +0200 (2019-04-25)
parents 30ecff9acf47
children fab4e6165be9
files ChangeLog src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,7 +16,7 @@
 - Improved MonetDatabaseMetaData methods:
   - getNumericFunctions(): it no longer lists aggregate functions: avg, prod and sum
   - getSystemFunctions(): it no longer lists timedate function: extract
-  - getTimeDateFunctions(): it now also lists function: epoch
+  - getTimeDateFunctions(): it now also lists functions: date_trunc, epoch
 - Corrected MonetDatabaseMetaData method getTypeInfo() for result column
   SEARCHABLE. It now returns DatabaseMetaData.typeSearchable for all
   string data types including 'inet','json','url','uuid' and 'blob'.
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
@@ -532,7 +532,7 @@ public class MonetDatabaseMetaData exten
 	@Override
 	public String getTimeDateFunctions() {
 		String wherePart =
-			 "\"mod\" IN ('mtime','timestamp') OR \"name\" IN ('localtime','localtimestamp')";
+			 "\"mod\" IN ('mtime','timestamp') OR \"name\" IN ('localtime','localtimestamp','date_trunc')";
 		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'" +