Mercurial > hg > monetdb-java
diff src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java @ 642:dd9b4fb14256
Added recognition of 'xml' type.
Use default mapping to Types.VARCHAR for easy and fast (as java.lang.String) retrieval, display and setting data of columns of type 'xml'.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Thu, 10 Feb 2022 15:12:30 +0100 (2022-02-10) |
parents | 71bcc7af90be |
children | ed3d0c1a60cf |
line wrap: on
line diff
--- a/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java +++ b/src/main/java/org/monetdb/jdbc/MonetPreparedStatement.java @@ -2336,9 +2336,13 @@ public class MonetPreparedStatement } castprefix = "uuid "; break; + // case "xml": + // currently any string is accepted by MonetDB, so no validity check needed + // castprefix = "xml "; also do NOT add a cast as MonetDB implicitly already converts a String to an xml String + // break; } if (castprefix != null) { - /* in specific cases prefix the string with: inet or json or url or uuid casting */ + /* in specific cases prefix the string with: inet or json or url or uuid or xml casting */ setValue(parameterIndex, castprefix + MonetWrapper.sq(x)); } else { setValue(parameterIndex, MonetWrapper.sq(x));