Changeset: 57978db4ee57 for monetdb-java URL: http://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=57978db4ee57 Modified Files: src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java src/main/java/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java src/main/java/nl/cwi/monetdb/jdbc/MonetStatement.java src/main/java/nl/cwi/monetdb/mcl/net/MapiSocket.java src/main/java/nl/cwi/monetdb/mcl/parser/TupleLineParser.java src/main/java/nl/cwi/monetdb/merovingian/Control.java src/main/java/nl/cwi/monetdb/merovingian/SabaothDB.java src/main/java/nl/cwi/monetdb/util/CmdLineOpts.java src/main/java/nl/cwi/monetdb/util/Exporter.java src/main/java/nl/cwi/monetdb/util/Extract.java src/main/java/nl/cwi/monetdb/util/SQLExporter.java src/main/java/nl/cwi/monetdb/util/SQLRestore.java src/main/java/nl/cwi/monetdb/util/XMLExporter.java Branch: embedded Log Message:
Cleaned old code of the JDBC driver, fixed documentation diffs (truncated from 3780 to 300 lines): diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetConnection.java @@ -1603,9 +1603,9 @@ public class MonetConnection extends Mon private String[] name; /** The types of the columns in this result */ private String[] type; - /** The max string length for each column in this result */ + /** The max string length for each columns in this result */ private int[] columnLengths; - /** The table for each column in this result */ + /** The table for each columns in this result */ private String[] tableNames; /** The query sequence number */ private final int seqnr; @@ -1811,7 +1811,7 @@ public class MonetConnection extends Mon if (!isSet[NAMES]) error += "name header missing\n"; if (!isSet[TYPES]) error += "type header missing\n"; if (!isSet[TABLES]) error += "table name header missing\n"; - if (!isSet[LENS]) error += "column width header missing\n"; + if (!isSet[LENS]) error += "columns width header missing\n"; if (error != "") throw new SQLException(error, "M0M10"); } @@ -2008,7 +2008,7 @@ public class MonetConnection extends Mon * <pre> * [ "value", 56 ] * </pre> - * where each column is separated by ",\t" and each tuple surrounded + * where each columns is separated by ",\t" and each tuple surrounded * by brackets ("[" and "]"). A DataBlockResponse object holds the * raw data as read from the server, in a parsed manner, ready for * easy retrieval. diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java --- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @@ -433,7 +433,7 @@ public class MonetDatabaseMetaData exten /** * Internal utility method getConcatenatedStringFromQuery(String query) - * args: query: SQL SELECT query. Only the output of the first column is concatenated. + * args: query: SQL SELECT query. Only the output of the first columns is concatenated. * @return a String of query result values concatenated into one string, and values separated by comma's */ private String getConcatenatedStringFromQuery(String query) { @@ -443,7 +443,7 @@ public class MonetDatabaseMetaData exten try { st = con.createStatement(); rs = st.executeQuery(query); - // Fetch the first column output and concatenate the values into a StringBuilder separated by comma's + // Fetch the first columns output and concatenate the values into a StringBuilder separated by comma's boolean isfirst = true; while (rs.next()) { String value = rs.getString(1); @@ -548,7 +548,7 @@ public class MonetDatabaseMetaData exten } /** - * Is "ALTER TABLE" with an add column supported? + * Is "ALTER TABLE" with an add columns supported? * * @return true if so */ @@ -558,7 +558,7 @@ public class MonetDatabaseMetaData exten } /** - * Is "ALTER TABLE" with a drop column supported? + * Is "ALTER TABLE" with a drop columns supported? * * @return true if so */ @@ -568,7 +568,7 @@ public class MonetDatabaseMetaData exten } /** - * Is column aliasing supported? + * Is columns aliasing supported? * * <p>If so, the SQL AS clause can be used to provide names for * computed columns or to provide alias names for columns as @@ -580,7 +580,7 @@ public class MonetDatabaseMetaData exten * select count(C) as C_COUNT from T group by C; * * </pre><br> - * should return a column named as C_COUNT instead of count(C) + * should return a columns named as C_COUNT instead of count(C) * * @return true if so */ @@ -1343,14 +1343,14 @@ public class MonetDatabaseMetaData exten } /** - * Whats the limit on column name length. + * Whats the limit on columns name length. * I take some safety here, but it's just a varchar in MonetDB * - * @return the maximum column name length + * @return the maximum columns name length */ @Override public int getMaxColumnNameLength() { - return 1024; // In MonetDB the max length of column sys._columns.name is defined as 1024 + return 1024; // In MonetDB the max length of columns sys._columns.name is defined as 1024 } /** @@ -1396,7 +1396,7 @@ public class MonetDatabaseMetaData exten /** * What is the maximum number of columns in a table? * - * The theoretical max value of int column sys._columns.id is 2^31 -1 + * The theoretical max value of int columns sys._columns.id is 2^31 -1 * but this is for all columns of all tables in all schemas (including all data dictionary columns). * For one table we should reduce it to a more practical soft limit of say 100 thousand * @@ -1466,7 +1466,7 @@ public class MonetDatabaseMetaData exten */ @Override public int getMaxSchemaNameLength() { - return 1024; // In MonetDB the max length of column sys.schemas.name is defined as 1024 + return 1024; // In MonetDB the max length of columns sys.schemas.name is defined as 1024 } /** @@ -1476,7 +1476,7 @@ public class MonetDatabaseMetaData exten */ @Override public int getMaxProcedureNameLength() { - return 256; // In MonetDB the max length of column sys.functions.name is defined as 256 + return 256; // In MonetDB the max length of columns sys.functions.name is defined as 256 } /** @@ -1541,7 +1541,7 @@ public class MonetDatabaseMetaData exten */ @Override public int getMaxTableNameLength() { - return 1024; // In MonetDB the max length of column sys._tables.name is defined as 1024 + return 1024; // In MonetDB the max length of columns sys._tables.name is defined as 1024 } /** @@ -1562,7 +1562,7 @@ public class MonetDatabaseMetaData exten */ @Override public int getMaxUserNameLength() { - return 1024; // In MonetDB the max length of column sys.db_user_info.name is defined as 1024 + return 1024; // In MonetDB the max length of columns sys.db_user_info.name is defined as 1024 } /** @@ -1743,22 +1743,22 @@ public class MonetDatabaseMetaData exten * criteria are returned. They are ordered by PROCEDURE_SCHEM, PROCEDURE_NAME * and SPECIFIC_NAME. Within this, the return value, if any, is first. * Next are the parameter descriptions in call order. The - * column descriptions follow in column number order. + * columns descriptions follow in columns number order. * - * <p>Each row in the ResultSet is a parameter description or column + * <p>Each row in the ResultSet is a parameter description or columns * description with the following fields: * <ol> * <li><b>PROCEDURE_CAT</b> String => procedure catalog (may be null) * <li><b>PROCEDURE_SCHEM</b> String => procedure schema (may be null) * <li><b>PROCEDURE_NAME</b> String => procedure name - * <li><b>COLUMN_NAME</b> String => column/parameter name - * <li><b>COLUMN_TYPE</b> Short => kind of column/parameter: + * <li><b>COLUMN_NAME</b> String => columns/parameter name + * <li><b>COLUMN_TYPE</b> Short => kind of columns/parameter: * <ul><li>procedureColumnUnknown - nobody knows * <li>procedureColumnIn - IN parameter * <li>procedureColumnInOut - INOUT parameter * <li>procedureColumnOut - OUT parameter * <li>procedureColumnReturn - procedure return value - * <li>procedureColumnResult - result column in ResultSet + * <li>procedureColumnResult - result columns in ResultSet * </ul> * <li><b>DATA_TYPE</b> int => SQL type from java.sql.Types * <li><b>TYPE_NAME</b> String => SQL type name, for a UDT type the type name is fully qualified @@ -1771,8 +1771,8 @@ public class MonetDatabaseMetaData exten * <li>procedureNullable - allows NULL values * <li>procedureNullableUnknown - nullability unknown * </ul> - * <li><b>REMARKS</b> String => comment describing parameter/column - * <li><b>COLUMN_DEF</b> String => default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be null) + * <li><b>REMARKS</b> String => comment describing parameter/columns + * <li><b>COLUMN_DEF</b> String => default value for the columns, which should be interpreted as a string when the value is enclosed in single quotes (may be null) * The string NULL (not enclosed in quotes) - if NULL was specified as the default value * TRUNCATE (not enclosed in quotes) - if the specified default value cannot be represented without truncation * NULL - if a default value was not specified @@ -1781,8 +1781,8 @@ public class MonetDatabaseMetaData exten * <li><b>CHAR_OCTET_LENGTH</b> int => the maximum length of binary and character based columns. For any other datatype the returned value is a NULL * <li><b>ORDINAL_POSITION</b> int => the ordinal position, starting from 1, for the input and output parameters for a procedure. * A value of 0 is returned if this row describes the procedure's return value. For result set columns, it is the ordinal position of the - * column in the result set starting from 1. If there are multiple result sets, the column ordinal positions are implementation defined. - * <li><b>IS_NULLABLE</b> String => ISO rules are used to determine the nullability for a column. + * columns in the result set starting from 1. If there are multiple result sets, the columns ordinal positions are implementation defined. + * <li><b>IS_NULLABLE</b> String => ISO rules are used to determine the nullability for a columns. * <ul><li>YES --- if the parameter can include NULLs * <li>NO --- if the parameter cannot include NULLs * <li>empty string --- if the nullability for the parameter is unknown @@ -1796,8 +1796,8 @@ public class MonetDatabaseMetaData exten * "" retrieves those without a schema; * null means that the schema name should not be used to narrow the search * @param procedureNamePattern - a procedure name pattern; must match the procedure name as it is stored in the database - * @param columnNamePattern - a column name pattern; must match the column name as it is stored in the database - * @return ResultSet - each row describes a stored procedure parameter or column + * @param columnNamePattern - a columns name pattern; must match the columns name as it is stored in the database + * @return ResultSet - each row describes a stored procedure parameter or columns * @throws SQLException if a database-access error occurs * @see #getSearchStringEscape */ @@ -1886,7 +1886,7 @@ public class MonetDatabaseMetaData exten /** * Returns the given string between two double quotes for usage as - * exact column or table name in SQL queries. + * exact columns or table name in SQL queries. * * @param in the string to quote * @return the quoted string @@ -1916,7 +1916,7 @@ public class MonetDatabaseMetaData exten * <li><b>TYPE_CAT</b> String => the types catalog (may be null) * <li><b>TYPE_SCHEM</b> String => the types schema (may be null) * <li><b>TYPE_NAME</b> String => type name (may be null) - * <li><b>SELF_REFERENCING_COL_NAME</b> String => name of the designated "identifier" column of a typed table (may be null) + * <li><b>SELF_REFERENCING_COL_NAME</b> String => name of the designated "identifier" columns of a typed table (may be null) * <li><b>REF_GENERATION</b> String => specifies how values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", "DERIVED". (may be null) * </ol> * @@ -2019,7 +2019,7 @@ public class MonetDatabaseMetaData exten * Get the schema names available in this database. The results * are ordered by schema name. * - * <P>The schema column is: + * <P>The schema columns is: * <OL> * <LI><B>TABLE_SCHEM</B> String => schema name * <LI><B>TABLE_CATALOG</B> String => catalog name (may be null) @@ -2032,7 +2032,7 @@ public class MonetDatabaseMetaData exten * @param schemaPattern a schema name; must match the schema name as * it is stored in the database; null means schema name * should not be used to narrow down the search. - * @return ResultSet each row has a single String column that is a + * @return ResultSet each row has a single String columns that is a * schema name * @throws SQLException if a database error occurs */ @@ -2063,13 +2063,13 @@ public class MonetDatabaseMetaData exten * Get the catalog names available in this database. The results * are ordered by catalog name. * - * <P>The catalog column is: + * <P>The catalog columns is: * <OL> * <LI><B>TABLE_CAT</B> String => catalog name * </OL> * * - * @return ResultSet each row has a single String column that is a + * @return ResultSet each row has a single String columns that is a * catalog name * @throws SQLException if a database error occurs */ @@ -2091,7 +2091,7 @@ public class MonetDatabaseMetaData exten * "LOCAL TEMPORARY", "ALIAS", "SYNONYM". * </OL> * - * @return ResultSet each row has a single String column that is a + * @return ResultSet each row has a single String columns that is a * table type * @throws SQLException if a database error occurs */ @@ -2118,19 +2118,19 @@ public class MonetDatabaseMetaData exten /** * Get a description of table columns available in a catalog. * - * <P>Only column descriptions matching the catalog, schema, table - * and column name criteria are returned. They are ordered by + * <P>Only columns descriptions matching the catalog, schema, table + * and columns name criteria are returned. They are ordered by * TABLE_SCHEM, TABLE_NAME and ORDINAL_POSITION. * - * <P>Each column description has the following columns: + * <P>Each columns description has the following columns: * <OL> * <LI><B>TABLE_CAT</B> String => table catalog (may be null) * <LI><B>TABLE_SCHEM</B> String => table schema (may be null) * <LI><B>TABLE_NAME</B> String => table name - * <LI><B>COLUMN_NAME</B> String => column name + * <LI><B>COLUMN_NAME</B> String => columns name * <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types * <LI><B>TYPE_NAME</B> String => Data source dependent type name - * <LI><B>COLUMN_SIZE</B> int => column size. For char or date + * <LI><B>COLUMN_SIZE</B> int => columns size. For char or date * types this is the maximum number of characters, for numeric or * decimal types this is precision. * <LI><B>BUFFER_LENGTH</B> is not used. _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list