01: /*-------------------------------------------------------------------------
02: *
03: * Copyright (c) 2003-2005, PostgreSQL Global Development Group
04: *
05: * IDENTIFICATION
06: * $PostgreSQL: pgjdbc/org/postgresql/core/BaseStatement.java,v 1.17 2005/01/11 08:25:43 jurka Exp $
07: *
08: *-------------------------------------------------------------------------
09: */
10: package org.postgresql.core;
11:
12: import org.postgresql.PGStatement;
13: import java.sql.*;
14: import java.util.Vector;
15:
16: /**
17: * Driver-internal statement interface. Application code should not use
18: * this interface.
19: */
20: public interface BaseStatement extends PGStatement, Statement {
21: /**
22: * Create a synthetic resultset from data provided by the driver.
23: *
24: * @param fields the column metadata for the resultset
25: * @param tuples the resultset data
26: * @return the new ResultSet
27: * @throws SQLException if something goes wrong
28: */
29: public ResultSet createDriverResultSet(Field[] fields, Vector tuples)
30: throws SQLException;
31:
32: /**
33: * Create a resultset from data retrieved from the server.
34: *
35: * @param originalQuery the query that generated this resultset; used when dealing with updateable resultsets
36: * @param fields the column metadata for the resultset
37: * @param tuples the resultset data
38: * @param cursor the cursor to use to retrieve more data from the server; if null, no additional data is present.
39: * @return the new ResultSet
40: * @throws SQLException if something goes wrong
41: */
42: public ResultSet createResultSet(Query originalQuery,
43: Field[] fields, Vector tuples, ResultCursor cursor)
44: throws SQLException;
45:
46: /**
47: * Execute a query, passing additional query flags.
48: *
49: * @param p_sql the query to execute
50: * @param flags additional {@link QueryExecutor} flags for execution; these
51: * are bitwise-ORed into the default flags.
52: * @throws SQLException if something goes wrong.
53: */
54: public boolean executeWithFlags(String p_sql, int flags)
55: throws SQLException;
56:
57: /**
58: * Execute a prepared query, passing additional query flags.
59: *
60: * @param flags additional {@link QueryExecutor} flags for execution; these
61: * are bitwise-ORed into the default flags.
62: * @throws SQLException if something goes wrong.
63: */
64: public boolean executeWithFlags(int flags) throws SQLException;
65: }
|