de.suse.lib.sqlmap.drivers
Class PgSQLDriver
java.lang.Object
de.suse.lib.sqlmap.drivers.GenericDriver
de.suse.lib.sqlmap.drivers.PgSQLDriver
- All Implemented Interfaces:
- DBConnectionDriver
public class PgSQLDriver
- extends GenericDriver
Constructor Summary |
PgSQLDriver(java.sql.Connection conn)
Create a driver out of the connection. |
PgSQLDriver(java.lang.String url)
Create a driver to an URL connection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PgSQLDriver
public PgSQLDriver(java.lang.String url)
throws java.net.URISyntaxException,
java.lang.ClassNotFoundException,
java.sql.SQLException,
java.lang.Exception
- Create a driver to an URL connection.
- Parameters:
url
-
- Throws:
java.net.URISyntaxException
java.lang.ClassNotFoundException
java.sql.SQLException
java.lang.Exception
PgSQLDriver
public PgSQLDriver(java.sql.Connection conn)
- Create a driver out of the connection.
- Parameters:
conn
-
parseURL
protected void parseURL()
throws java.sql.SQLException
- Description copied from class:
GenericDriver
- Parse URL for connect.
- Overrides:
parseURL
in class GenericDriver
- Throws:
java.sql.SQLException
setUseSSL
public PgSQLDriver setUseSSL(boolean useSSL)
- Use SSL connection?
- Parameters:
useSSL
-
connect
public PgSQLDriver connect(java.lang.String user,
java.lang.String password)
throws java.lang.Exception
- Connect to the PostgreSQL database with already given URL.
- Specified by:
connect
in interface DBConnectionDriver
- Overrides:
connect
in class GenericDriver
- Parameters:
user
- password
-
- Returns:
-
- Throws:
java.lang.Exception
getConnection
public java.sql.Connection getConnection()
- Specified by:
getConnection
in interface DBConnectionDriver
- Overrides:
getConnection
in class GenericDriver