Update of /cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/jdbc
In directory 
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31067/src/nl/cwi/monetdb/jdbc

Modified Files:
      Tag: Clients_1-18
        MonetConnection.java MonetDatabaseMetaData.java 
        MonetDriver.java.in MonetStatement.java 
Log Message:
Merged HEAD into Clients_1-18


Index: MonetConnection.java
===================================================================
RCS file: 
/cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/jdbc/MonetConnection.java,v
retrieving revision 1.15.2.1
retrieving revision 1.15.2.2
diff -u -d -r1.15.2.1 -r1.15.2.2
--- MonetConnection.java        5 Jun 2007 10:47:42 -0000       1.15.2.1
+++ MonetConnection.java        16 Aug 2007 10:52:48 -0000      1.15.2.2
@@ -159,8 +159,6 @@
                        throw new IllegalArgumentException("hostname should not 
be null or empty");
                if (port == 0)
                        throw new IllegalArgumentException("port should not be 
0");
-               if (database == null || database.trim().equals(""))
-                       throw new IllegalArgumentException("database should not 
be null or empty");
                if (username == null || username.trim().equals(""))
                        throw new IllegalArgumentException("user should not be 
null or empty");
                if (password == null || password.trim().equals(""))
@@ -2088,7 +2086,7 @@
                 *
                 * @param monet the socket to write to
                 */
-               public SendThread(BufferedMCLWriter conn) {
+               public SendThread(BufferedMCLWriter out) {
                        super("SendThread");
                        setDaemon(true);
                        this.out = out;

Index: MonetDatabaseMetaData.java
===================================================================
RCS file: 
/cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -d -r1.5 -r1.5.2.1
--- MonetDatabaseMetaData.java  27 Apr 2007 07:41:16 -0000      1.5
+++ MonetDatabaseMetaData.java  16 Aug 2007 10:52:49 -0000      1.5.2.1
@@ -194,7 +194,7 @@
         * @throws SQLException if a database access error occurs
         */
        public String getDatabaseProductVersion() throws SQLException {
-               return(getEnv("gdk_version"));
+               return(getEnv("monet_version"));
        }
 
        /**

Index: MonetStatement.java
===================================================================
RCS file: 
/cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/jdbc/MonetStatement.java,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- MonetStatement.java 20 Apr 2007 13:41:28 -0000      1.3
+++ MonetStatement.java 16 Aug 2007 10:52:52 -0000      1.3.2.1
@@ -535,7 +535,21 @@
                }
        }
 
-       public int getQueryTimeout() throws SQLException { throw new 
SQLException("Method not supported, sorry!"); }
+       /**
+        * Retrieves the number of seconds the driver will wait for a
+        * Statement object to execute.  If the limit is exceeded, a
+        * SQLException is thrown.
+        * For MonetDB this method always returns zero, as no query
+        * cancelling is possible.
+        *
+        * @return the current query timeout limit in seconds; zero means
+        *         there is no limit 
+        * @throws SQLException if a database access error occurs
+        * @see #setQueryTimeout(int)
+        */
+       public int getQueryTimeout() throws SQLException {
+               return(0);
+       }
 
        /**
         * Retrieves the current result as a ResultSet object.  This method

Index: MonetDriver.java.in
===================================================================
RCS file: 
/cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/jdbc/MonetDriver.java.in,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -d -r1.7 -r1.7.2.1
--- MonetDriver.java.in 23 Apr 2007 13:10:59 -0000      1.7
+++ MonetDriver.java.in 16 Aug 2007 10:52:51 -0000      1.7.2.1
@@ -52,7 +52,8 @@
        /** Minor version of this driver */
        private static final int DRIVERMINOR = @JDBC_MINOR@;
        /** Version suffix string */
-       private static final String DRIVERVERSIONSUFFIX = "@JDBC_VER_SUFFIX@";
+       private static final String DRIVERVERSIONSUFFIX =
+               "@JDBC_VER_SUFFIX@ based on MCL [EMAIL PROTECTED]@[EMAIL 
PROTECTED]@";
        // We're not fully compliant, but what we support is compliant
        /** Whether this driver is JDBC compliant or not */
        private static final boolean MONETJDBCCOMPLIANT = false;
@@ -138,11 +139,11 @@
                if (uri.getPort() > 0) info.put("port", "" + uri.getPort());
 
                // check the database
-               if (uri.getPath() == null || uri.getPath().length() == 0 ||
-                               uri.getPath().substring(1).trim().equals(""))
-                       throw new SQLException("Invalid URL: A database is " +
-                                       "required in '" +  url + "'");
-               info.put("database", uri.getPath().substring(1));
+               if (uri.getPath() != null && uri.getPath().length() != 0 &&
+                               !uri.getPath().substring(1).trim().equals(""))
+               {
+                       info.put("database", uri.getPath().substring(1));
+               }
 
                if (uri.getQuery() != null) {
                        // handle additional arguments
@@ -276,6 +277,7 @@
                typeMap.put("varchar", new Integer(Types.VARCHAR));
                typeMap.put("clob", new Integer(Types.CLOB));
                typeMap.put("oid", new Integer(Types.OTHER));
+               typeMap.put("tinyint", new Integer(Types.TINYINT));
                typeMap.put("smallint", new Integer(Types.SMALLINT));
                typeMap.put("int", new Integer(Types.INTEGER));
                typeMap.put("bigint", new Integer(Types.BIGINT));


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to