File: BaseStatement.java

package info (click to toggle)
libpgjava 8.4-701-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,532 kB
  • ctags: 4,162
  • sloc: java: 33,948; xml: 3,158; makefile: 14; sh: 10
file content (62 lines) | stat: -rw-r--r-- 2,347 bytes parent folder | download
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
/*-------------------------------------------------------------------------
*
* Copyright (c) 2003-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
*   $PostgreSQL: pgjdbc/org/postgresql/core/BaseStatement.java,v 1.18 2008/01/08 06:56:27 jurka Exp $
*
*-------------------------------------------------------------------------
*/
package org.postgresql.core;

import org.postgresql.PGStatement;
import java.sql.*;
import java.util.Vector;

/**
 * Driver-internal statement interface. Application code should not use
 * this interface.
 */
public interface BaseStatement extends PGStatement, Statement
{
    /**
     * Create a synthetic resultset from data provided by the driver.
     *
     * @param fields the column metadata for the resultset
     * @param tuples the resultset data
     * @return the new ResultSet
     * @throws SQLException if something goes wrong
     */
    public ResultSet createDriverResultSet(Field[] fields, Vector tuples) throws SQLException;

    /**
     * Create a resultset from data retrieved from the server.
     *
     * @param originalQuery the query that generated this resultset; used when dealing with updateable resultsets
     * @param fields the column metadata for the resultset
     * @param tuples the resultset data
     * @param cursor the cursor to use to retrieve more data from the server; if null, no additional data is present.
     * @return the new ResultSet
     * @throws SQLException if something goes wrong
     */
    public ResultSet createResultSet(Query originalQuery, Field[] fields, Vector tuples, ResultCursor cursor) throws SQLException;

    /**
     * Execute a query, passing additional query flags.
     *
     * @param p_sql the query to execute
     * @param flags additional {@link QueryExecutor} flags for execution; these
     *  are bitwise-ORed into the default flags.
     * @throws SQLException if something goes wrong.
     */
    public boolean executeWithFlags(String p_sql, int flags) throws SQLException;

    /**
     * Execute a prepared query, passing additional query flags.
     *
     * @param flags additional {@link QueryExecutor} flags for execution; these
     *  are bitwise-ORed into the default flags.
     * @throws SQLException if something goes wrong.
     */
    public boolean executeWithFlags(int flags) throws SQLException;
}