Jdbc1Connection.java 1.7 KB
Newer Older
1 2 3 4 5 6 7 8
package org.postgresql.jdbc1;


import java.util.Vector;
import java.sql.*;
import org.postgresql.Field;
import org.postgresql.util.PSQLException;

9
/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Attic/Jdbc1Connection.java,v 1.3 2002/07/25 22:45:28 barry Exp $
10 11 12 13 14 15 16 17 18 19 20 21 22 23
 * This class implements the java.sql.Connection interface for JDBC1.
 * However most of the implementation is really done in 
 * org.postgresql.jdbc1.AbstractJdbc1Connection
 */
public class Jdbc1Connection extends org.postgresql.jdbc1.AbstractJdbc1Connection implements java.sql.Connection
{

	public java.sql.Statement createStatement() throws SQLException
	{
		return new org.postgresql.jdbc1.Jdbc1Statement(this);
	}

	public java.sql.PreparedStatement prepareStatement(String sql) throws SQLException
	{
24
		return new org.postgresql.jdbc1.Jdbc1PreparedStatement(this, sql);
25 26 27 28
	}

	public java.sql.CallableStatement prepareCall(String sql) throws SQLException
	{
29
		return new org.postgresql.jdbc1.Jdbc1CallableStatement(this, sql);
30 31 32 33 34 35 36 37 38 39 40
	}

	public java.sql.DatabaseMetaData getMetaData() throws SQLException
	{
		if (metadata == null)
			metadata = new org.postgresql.jdbc1.DatabaseMetaData(this);
		return metadata;
	}

	public java.sql.ResultSet getResultSet(java.sql.Statement stat, Field[] fields, Vector tuples, String status, int updateCount, long insertOID, boolean binaryCursor) throws SQLException
	{
41 42 43 44 45 46
		return new Jdbc1ResultSet(this, stat, fields, tuples, status, updateCount, insertOID, binaryCursor);
	}

	public java.sql.ResultSet getResultSet(java.sql.Statement stat, Field[] fields, Vector tuples, String status, int updateCount) throws SQLException
	{
		return new Jdbc1ResultSet(this, stat, fields, tuples, status, updateCount, 0, false);
47 48 49 50 51
	}

}