01: /*-------------------------------------------------------------------------
02: *
03: * Copyright (c) 2004-2005, PostgreSQL Global Development Group
04: *
05: * IDENTIFICATION
06: * $PostgreSQL: pgjdbc/org/postgresql/jdbc3/Jdbc3Statement.java,v 1.13 2006/06/08 10:34:50 jurka Exp $
07: *
08: *-------------------------------------------------------------------------
09: */
10: package org.postgresql.jdbc3;
11:
12: import java.sql.*;
13: import java.util.Vector;
14: import org.postgresql.core.*;
15:
16: /**
17: * This class implements the java.sql.Statement interface for JDBC3.
18: * However most of the implementation is really done in
19: * org.postgresql.jdbc3.AbstractJdbc3Statement or one of it's parents
20: */
21: class Jdbc3Statement extends AbstractJdbc3Statement implements
22: Statement {
23: Jdbc3Statement(Jdbc3Connection c, int rsType, int rsConcurrency,
24: int rsHoldability) throws SQLException {
25: super (c, rsType, rsConcurrency, rsHoldability);
26: }
27:
28: protected Jdbc3Statement(Jdbc3Connection connection, String sql,
29: boolean isCallable, int rsType, int rsConcurrency,
30: int rsHoldability) throws SQLException {
31: super (connection, sql, isCallable, rsType, rsConcurrency,
32: rsHoldability);
33: }
34:
35: public ResultSet createResultSet(Query originalQuery,
36: Field[] fields, Vector tuples, ResultCursor cursor)
37: throws SQLException {
38: Jdbc3ResultSet newResult = new Jdbc3ResultSet(originalQuery,
39: this , fields, tuples, cursor, getMaxRows(),
40: getMaxFieldSize(), getResultSetType(),
41: getResultSetConcurrency(), getResultSetHoldability());
42: newResult.setFetchSize(getFetchSize());
43: newResult.setFetchDirection(getFetchDirection());
44: return newResult;
45: }
46:
47: public ParameterMetaData createParameterMetaData(
48: BaseConnection conn, int oids[]) throws SQLException {
49: return new Jdbc3ParameterMetaData(conn, oids);
50: }
51:
52: }
|