changeset 152:352b54ff0436

Implemented ResultSet method getNCharacterStream()
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 17 Aug 2017 19:31:42 +0200 (2017-08-17)
parents 3d5ea891bb74
children 836c49b890ec
files ChangeLog release.txt src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 # This file is updated with Maddlog
 
 * Thu Aug 17 2017 Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
+- Implemented ResultSet method getNCharacterStream()
 - In class MonetClob implemented methods getCharacterStream()
   and getCharacterStream(long pos, long length).  Method
   getCharacterStream() is called by DBeaver to fetch the Clob value.
--- a/release.txt
+++ b/release.txt
@@ -64,9 +64,9 @@ Currently implemented JDBC 4.1 interface
     The next features/methods are NOT implemented:
     - getArray
     - getAsciiStream, getUnicodeStream
-    - getNCharacterStream, getNClob, getNString
+    - getNClob
     - getRef, getRowId, getSQLXML
-    - all methods related to updateable result sets
+    - All methods related to updateable result sets
 
   * java.sql.ResultSetMetaData
 
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
@@ -515,7 +515,7 @@ public class MonetResultSet extends Mone
 	 */
 	@Override
 	public Reader getNCharacterStream(int columnIndex) throws SQLException {
-		throw newSQLFeatureNotSupportedException("getNCharacterStream");
+		return getCharacterStream(columnIndex);
 	}
 
 	/**
@@ -534,7 +534,7 @@ public class MonetResultSet extends Mone
 	 */
 	@Override
 	public Reader getNCharacterStream(String columnLabel) throws SQLException {
-		throw newSQLFeatureNotSupportedException("getNCharacterStream");
+		return getCharacterStream(findColumn(columnLabel));
 	}
 
 	/**
@@ -2534,7 +2534,7 @@ public class MonetResultSet extends Mone
 	 */
 	@Override
 	public String getNString(String columnLabel) throws SQLException {
-		return getNString(findColumn(columnLabel));
+		return getString(findColumn(columnLabel));
 	}
 
 	/**