1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
/*-------------------------------------------------------------------------
*
* Copyright (c) 2004-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/Jdbc2Connection.java,v 1.14 2005/01/11 08:25:46 jurka Exp $
*
*-------------------------------------------------------------------------
*/
package org.postgresql.jdbc2;
import java.sql.*;
import java.util.Map;
import java.util.Properties;
/**
* This class implements the java.sql.Connection interface for JDBC2.
* However most of the implementation is really done in
* org.postgresql.jdbc2.AbstractJdbc2Connection
*/
public class Jdbc2Connection extends org.postgresql.jdbc2.AbstractJdbc2Connection implements java.sql.Connection
{
public Jdbc2Connection(String host, int port, String user, String database, Properties info, String url) throws SQLException {
super(host, port, user, database, info, url);
}
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
{
Jdbc2Statement s = new Jdbc2Statement(this, resultSetType, resultSetConcurrency);
s.setPrepareThreshold(getPrepareThreshold());
return s;
}
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
{
Jdbc2PreparedStatement s = new Jdbc2PreparedStatement(this, sql, resultSetType, resultSetConcurrency);
s.setPrepareThreshold(getPrepareThreshold());
return s;
}
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
{
Jdbc2CallableStatement s = new org.postgresql.jdbc2.Jdbc2CallableStatement(this, sql, resultSetType, resultSetConcurrency);
s.setPrepareThreshold(getPrepareThreshold());
return s;
}
public DatabaseMetaData getMetaData() throws SQLException
{
if (metadata == null)
metadata = new org.postgresql.jdbc2.Jdbc2DatabaseMetaData(this);
return metadata;
}
public void setTypeMap(Map map) throws SQLException
{
setTypeMapImpl(map);
}
}
|