diff src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java @ 194:1296dbcc4958

Resolved javadoc many errors and warnings, such as: [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/HeaderLineParser.java:17: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/HeaderLineParser.java:17: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/StartOfHeaderParser.java:23: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/StartOfHeaderParser.java:23: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/TupleLineParser.java:37: error: reference not found [javadoc] * @throws ParseException if an error occurs during parsing [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/TupleLineParser.java:16: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/parser/TupleLineParser.java:16: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLReader.java:40: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLReader.java:40: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLReader.java:84: warning: no @throws for java.io.UnsupportedEncodingException [javadoc] public BufferedMCLReader(InputStream in, String enc) [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLWriter.java:35: error: malformed HTML [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLWriter.java:35: error: bad use of '>' [javadoc] * @author Fabian Groffen <Fabian.Groffen> [javadoc] ^ [javadoc] /export/scratch1/dinther/javadev/monetdb-java/src/main/java/nl/cwi/monetdb/mcl/io/BufferedMCLWriter.java:59: warning: no @throws for java.io.UnsupportedEncodingException [javadoc] public BufferedMCLWriter(OutputStream in, String enc) [javadoc] ^
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 26 Oct 2017 17:40:05 +0200 (2017-10-26)
parents 57f09396b22c
children 89c285fc0a49 c38d4eaf5479
line wrap: on
line diff
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java
@@ -25,7 +25,7 @@ import java.util.concurrent.locks.Reentr
  * A Statement suitable for the MonetDB database.
  *
  * The object used for executing a static SQL statement and returning
- * the results it produces.<br />
+ * the results it produces.
  *
  * By default, only one {@link ResultSet} object per Statement object can be
  * open at the same time. Therefore, if the reading of one ResultSet
@@ -38,7 +38,7 @@ import java.util.concurrent.locks.Reentr
  * executeQuery() which returns a ResultSet where from results can be
  * read and executeUpdate() which doesn't return the affected rows.
  * Commit and rollback are implemented, as is the autoCommit mechanism
- * which relies on server side auto commit.<br />
+ * which relies on server side auto commit.
  * Multi-result queries are supported using the getMoreResults() method.
  *
  * @author Fabian Groffen
@@ -161,7 +161,6 @@ public class MonetStatement
 	 * ordered according to the order in which they were added to the
 	 * batch.  The elements in the array returned by the method
 	 * executeBatch may be one of the following:
-	 * <br />
 	 * <ol>
 	 * <li>A number greater than or equal to zero -- indicates that the
 	 * command was processed successfully and is an update count giving
@@ -182,7 +181,7 @@ public class MonetStatement
 	 * If one of the commands attempts to return a result set, an
 	 * SQLException is added to the SQLException list and thrown
 	 * afterwards execution.  Failing queries result in SQLExceptions
-	 * too and may cause subparts of the batch to fail as well.<br />
+	 * too and may cause subparts of the batch to fail as well.
 	 *
 	 * @return an array of update counts containing one element for each
 	 *         command in the batch.  The elements of the array are ordered
@@ -547,7 +546,7 @@ public class MonetStatement
 	 * @param sql an SQL INSERT, UPDATE or DELETE statement or an SQL statement
 	 *        that returns nothing
 	 * @return either the row count for INSERT, UPDATE  or DELETE statements, or
-	 *         0 for SQL statements that return nothing<br />
+	 *         0 for SQL statements that return nothing
 	 * @throws SQLException if a database access error occurs or the given SQL
 	 *         statement produces a ResultSet object
 	 */
@@ -748,10 +747,11 @@ public class MonetStatement
 	 * @return the current column size limit for columns storing
 	 *         character and binary values; zero means there is no limit
 	 * @throws SQLException if a database access error occurs
+	 * @see #setMaxFieldSize(int max)
 	 */
 	@Override
-	public int getMaxFieldSize() {
-		return 0;
+	public int getMaxFieldSize() throws SQLException {
+		return 2*1024*1024*1024 - 2;	// MonetDB supports null terminated strings of max 2GB, see function: int UTF8_strlen()
 	}
 
 	/**
@@ -761,9 +761,11 @@ public class MonetStatement
 	 *
 	 * @return the current maximum number of rows for a ResultSet object
 	 *         produced by this Statement object; zero means there is no limit
+	 * @throws SQLException if a database access error occurs
+	 * @see #setMaxRows(int max)
 	 */
 	@Override
-	public int getMaxRows() {
+	public int getMaxRows() throws SQLException {
 		return maxRows;
 	}
 
@@ -772,7 +774,7 @@ public class MonetStatement
 	 * ResultSet object, and implicitly closes any current ResultSet object(s)
 	 * obtained with the method getResultSet.
 	 *
-	 * There are no more results when the following is true:<br />
+	 * There are no more results when the following is true:
 	 * (!getMoreResults() &amp;&amp; (getUpdateCount() == -1)
 	 *
 	 * @return true if the next result is a ResultSet object; false if it is
@@ -790,7 +792,7 @@ public class MonetStatement
 	 * ResultSet object(s) according to the instructions specified by the given
 	 * flag, and returns true if the next result is a ResultSet object.
 	 *
-	 * There are no more results when the following is true:<br />
+	 * There are no more results when the following is true:
 	 * (!getMoreResults() &amp;&amp; (getUpdateCount() == -1)
 	 *
 	 * @param current one of the following Statement constants indicating what
@@ -1066,6 +1068,7 @@ public class MonetStatement
 	 *        is no limit
 	 * @throws SQLException if a database access error occurs or the
 	 *         condition max &gt;= 0 is not satisfied
+	 * @see #getMaxFieldSize()
 	 */
 	@Override
 	public void setMaxFieldSize(int max) throws SQLException {
@@ -1081,7 +1084,8 @@ public class MonetStatement
 	 * rows are silently dropped.
 	 *
 	 * @param max the new max rows limit; zero means there is no limit
-	 * @throws SQLException if the condition max >= 0 is not satisfied
+	 * @throws SQLException if the condition max &gt;= 0 is not satisfied
+	 * @see #getMaxRows()
 	 */
 	@Override
 	public void setMaxRows(int max) throws SQLException {