Changeset: 3e553302fcfe for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3e553302fcfe
Modified Files:
        
Branch: default
Log Message:

Merged from Jun2010


diffs (92 lines):

diff -r 7431f248c36a -r 3e553302fcfe java/ChangeLog.Jun2010
--- a/java/ChangeLog.Jun2010    Wed Aug 11 14:18:00 2010 +0200
+++ b/java/ChangeLog.Jun2010    Wed Aug 11 15:35:07 2010 +0200
@@ -1,6 +1,11 @@
 # ChangeLog file for java
 # This file is updated with mchangelog (Gentoo echangelog bastard script)
 
+  11 Aug 2010; Fabian Groffen <fab...@cwi.nl> release.txt,
+  src/nl/cwi/monetdb/jdbc/MonetResultSet.java:
+  Implemented ResultSet's getCharacterStream methods, since Hibernate seems to
+  call this method for retrieving CLOB columns that we now do support.
+
   06 Aug 2010; Fabian Groffen <fab...@cwi.nl>
   src/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java:
   Fix implementation of setBytes method of PreparedStatement, such that bytes
@@ -30,7 +35,7 @@
   Enable the merovingian control library for default distribution as it
   has been in use for some time without problems now.
 
-  Wed Mar 31 2010 Stefan Manegold <maneg...@cwi.nl> configure.ag:
+  31 Mar 2010; Stefan Manegold <maneg...@cwi.nl> configure.ag:
   Made compilation of "testing" (and "java") independent of MonetDB.
   This is mainly for Windows, but also on other systems, "testing" can now be
   built independently of (and hence before) "MonetDB".
@@ -40,7 +45,7 @@
   getopt() support in testing has changed; hence, (most probably) requiring a
   rebuild from scratch of testing on other systems.
 
-  Wed Mar 24 2010 Stefan Manegold <maneg...@cwi.nl> Makefile.ag:
+  24 Mar 2010; Stefan Manegold <maneg...@cwi.nl> Makefile.ag:
   Implemented build directory support for Windows,
   i.e., like on Unix/Linux also on Windows we can now build in a separate
   build directory as alternative to ...<package>NT, and thus keep the
diff -r 7431f248c36a -r 3e553302fcfe java/release.txt
--- a/java/release.txt  Wed Aug 11 14:18:00 2010 +0200
+++ b/java/release.txt  Wed Aug 11 15:35:07 2010 +0200
@@ -62,10 +62,10 @@
   * java.sql.ResultSet interface
     The next features are not implemented:
     - getArray
-    - getAsciiStream, getBinaryStream, getUnicodeStream, getCharacterStream
+    - getAsciiStream, getBinaryStream, getUnicodeStream
     - getRef, getURL
     - all methods related to updateable result sets
-    * java.sql.ResultSetMetaData interface
+  * java.sql.ResultSetMetaData interface
   * java.sql.DatabaseMetaData interface
   * java.sql.SavePoint interface
 
diff -r 7431f248c36a -r 3e553302fcfe 
java/src/nl/cwi/monetdb/jdbc/MonetResultSet.java
--- a/java/src/nl/cwi/monetdb/jdbc/MonetResultSet.java  Wed Aug 11 14:18:00 
2010 +0200
+++ b/java/src/nl/cwi/monetdb/jdbc/MonetResultSet.java  Wed Aug 11 15:35:07 
2010 +0200
@@ -291,8 +291,37 @@
        public InputStream getBinaryStream(String columnName) throws 
SQLException { throw new SQLException("Method getBinaryStream not implemented 
yet, sorry!"); }
        public InputStream getUnicodeStream(int columnIndex) throws 
SQLException { throw new SQLException("Method getUnicodeStream not implemented 
yet, sorry!"); }
        public InputStream getUnicodeStream(String columnName) throws 
SQLException { throw new SQLException("Method getUnicodeStream not implemented 
yet, sorry!"); }
-       public Reader getCharacterStream(int columnIndex) throws SQLException { 
throw new SQLException("Method getCharacterStream not implemented yet, 
sorry!"); }
-       public Reader getCharacterStream(String columnName) throws SQLException 
{ throw new SQLException("Method getCharacterStream not implemented yet, 
sorry!"); }
+
+       /**
+        * Retrieves the value of the designated column in the current row
+        * of this ResultSet object as a java.io.Reader object.
+        *
+        * @param columnIndex the first column is 1, the second is 2, ...
+        * @return a java.io.Reader object that contains the column value;
+        *         if the value is SQL NULL, the value returned is null in
+        *         the Java programming language. 
+        * @throws SQLException if a database access error occurs
+        */
+       public Reader getCharacterStream(int columnIndex) throws SQLException {
+               String tmp = getString(columnIndex);
+               if (tmp == null)
+                       return(null);
+               return new StringReader(tmp);
+       }
+
+       /**
+        * Retrieves the value of the designated column in the current row
+        * of this ResultSet object as a java.io.Reader object.
+        *
+        * @param columnName the name of the column
+        * @return a java.io.Reader object that contains the column value;
+        *         if the value is SQL NULL, the value returned is null in
+        *         the Java programming language. 
+        * @throws SQLException if a database access error occurs
+        */
+       public Reader getCharacterStream(String columnName) throws SQLException 
{
+               return(getCharacterStream(findColumn(columnName)));
+       }
 
        /**
         * Retrieves the value of the designated column in the current row
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to