66 * Copyright (c) 2003, PostgreSQL Global Development Group
77 *
88 * IDENTIFICATION
9- * $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/Driver.java.in,v 1.39 2003/12/10 18:30:44 davec Exp $
9+ * $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/Driver.java.in,v 1.40 2003/12/11 18:10:40 davec Exp $
1010 *
1111 *-------------------------------------------------------------------------
1212 */
@@ -123,6 +123,7 @@ public class Driver implements java.sql.Driver
123123 */
124124public java.sql.Connection connect(String url, Properties info) throws SQLException
125125{
126+ Properties props;
126127if ((props = parseURL(url, info)) == null)
127128{
128129if (Driver.logDebug)
@@ -135,7 +136,7 @@ public class Driver implements java.sql.Driver
135136Driver.debug("connect " + url);
136137
137138@JDBCCONNECTCLASS@ con = (@JDBCCONNECTCLASS@)(Class.forName("@JDBCCONNECTCLASS@").newInstance());
138- con.openConnection (host(), port(), props, database(), url, this);
139+ con.openConnection (host(props ), port(props ), props, database(props ), url, this);
139140return (java.sql.Connection)con;
140141}
141142catch (ClassNotFoundException ex)
@@ -247,8 +248,6 @@ public class Driver implements java.sql.Driver
247248return false;
248249}
249250
250- private Properties props;
251-
252251static private String[] protocols = { "jdbc", "postgresql" };
253252
254253/*
@@ -386,36 +385,27 @@ public class Driver implements java.sql.Driver
386385/*
387386 * @return the hostname portion of the URL
388387 */
389- public String host()
388+ public String host(Properties props )
390389{
391390return props.getProperty("PGHOST", "localhost");
392391}
393392
394393/*
395394 * @return the port number portion of the URL or the default if no port was specified
396395 */
397- public int port()
396+ public int port(Properties props )
398397{
399398return Integer.parseInt(props.getProperty("PGPORT", "@DEF_PGPORT@"));
400399}
401400
402401/*
403402 * @return the database name of the URL
404403 */
405- public String database()
404+ public String database(Properties props )
406405{
407406return props.getProperty("PGDBNAME", "");
408407}
409408
410- /*
411- * @return the value of any property specified in the URL or properties
412- * passed to connect(), or null if not found.
413- */
414- public String property(String name)
415- {
416- return props.getProperty(name);
417- }
418-
419409/*
420410 * This method was added in v6.5, and simply throws an SQLException
421411 * for an unimplemented method. I decided to do it this way while
@@ -430,7 +420,7 @@ public class Driver implements java.sql.Driver
430420/**
431421*used to turn logging on to a certain level, can be called
432422*by specifying fully qualified class ie org.postgresql.Driver.setLogLevel()
433- *@paramint logLevel sets the level which logging will respond to
423+ *@param logLevel sets the level which logging will respond to
434424*INFO being almost no messages
435425*DEBUG most verbose
436426*/
@@ -508,6 +498,6 @@ public class Driver implements java.sql.Driver
508498
509499
510500//The build number should be incremented for every new build
511- private static int m_buildNumber =211 ;
501+ private static int m_buildNumber =300 ;
512502
513503}