Top Description Fields Methods
org.postgresql.core

public Interface BaseStatement

extends PGStatement, Statement
Known Direct Implementers
org.postgresql.jdbc.PgStatement
Imports
org.postgresql.PGStatement, java.sql.ResultSet, .SQLException, .Statement, java.util.List

Driver-internal statement interface. Application code should not use this interface.

Field Summary

Inherited from java.sql.Statement:
CLOSE_ALL_RESULTSCLOSE_CURRENT_RESULTEXECUTE_FAILEDKEEP_CURRENT_RESULTNO_GENERATED_KEYSRETURN_GENERATED_KEYSSUCCESS_NO_INFO
Inherited from org.postgresql.PGStatement:
DATE_NEGATIVE_INFINITYDATE_NEGATIVE_SMALLER_INFINITYDATE_POSITIVE_INFINITYDATE_POSITIVE_SMALLER_INFINITY

Method Summary

Modifier and TypeMethod and Description
public ResultSet

Returns:

the new ResultSet
createDriverResultSet
(Field[]
the column metadata for the resultset
fields
,
List<Tuple>
the resultset data
tuples
)

Create a synthetic resultset from data provided by the driver.

public ResultSet

Returns:

the new ResultSet
createResultSet
(Query
the query that generated this resultset; used when dealing with updateable resultsets
originalQuery
,
Field[]
the column metadata for the resultset
fields
,
List<Tuple>
the resultset data
tuples
,
ResultCursor
the cursor to use to retrieve more data from the server; if null, no additional data is present.
cursor
)

Create a resultset from data retrieved from the server.

public boolean

Returns:

true if there is a result set
executeWithFlags
(String
the query to execute (JDBC-style query)
sql
,
int
additional QueryExecutor flags for execution; these are bitwise-ORed into the default flags.
flags
)

Execute a query, passing additional query flags.

public boolean

Returns:

true if there is a result set
executeWithFlags
(CachedQuery
the query to execute (native to PostgreSQL)
cachedQuery
,
int
additional QueryExecutor flags for execution; these are bitwise-ORed into the default flags.
flags
)

Execute a query, passing additional query flags.

public boolean

Returns:

true if there is a result set
executeWithFlags
(int
additional QueryExecutor flags for execution; these are bitwise-ORed into the default flags.
flags
)

Execute a prepared query, passing additional query flags.

Inherited from java.sql.Statement:
addBatchcancelclearBatchclearWarningsclosecloseOnCompletionenquoteIdentifierenquoteLiteralenquoteNCharLiteralexecuteexecuteexecuteexecuteexecuteBatchexecuteLargeBatchexecuteLargeUpdateexecuteLargeUpdateexecuteLargeUpdateexecuteLargeUpdateexecuteQueryexecuteUpdateexecuteUpdateexecuteUpdateexecuteUpdategetConnectiongetFetchDirectiongetFetchSizegetGeneratedKeysgetLargeMaxRowsgetLargeUpdateCountgetMaxFieldSizegetMaxRowsgetMoreResultsgetMoreResultsgetQueryTimeoutgetResultSetgetResultSetConcurrencygetResultSetHoldabilitygetResultSetTypegetUpdateCountgetWarningsisClosedisCloseOnCompletionisPoolableisSimpleIdentifiersetCursorNamesetEscapeProcessingsetFetchDirectionsetFetchSizesetLargeMaxRowssetMaxFieldSizesetMaxRowssetPoolablesetQueryTimeout
Inherited from org.postgresql.PGStatement:
getAdaptiveFetchgetLastOIDgetPrepareThresholdisUseServerPreparesetAdaptiveFetchsetPrepareThresholdsetUseServerPrepare

Method Detail

createDriverResultSetback to summary
public ResultSet createDriverResultSet(Field[] fields, List<Tuple> tuples) throws SQLException

Create a synthetic resultset from data provided by the driver.

Parameters
fields:Field[]

the column metadata for the resultset

tuples:List<Tuple>

the resultset data

Returns:ResultSet

the new ResultSet

Exceptions
SQLException:
if something goes wrong
createResultSetback to summary
public ResultSet createResultSet(Query originalQuery, Field[] fields, List<Tuple> tuples, ResultCursor cursor) throws SQLException

Create a resultset from data retrieved from the server.

Parameters
originalQuery:Query

the query that generated this resultset; used when dealing with updateable resultsets

fields:Field[]

the column metadata for the resultset

tuples:List<Tuple>

the resultset data

cursor:ResultCursor

the cursor to use to retrieve more data from the server; if null, no additional data is present.

Returns:ResultSet

the new ResultSet

Exceptions
SQLException:
if something goes wrong
executeWithFlagsback to summary
public boolean executeWithFlags(String sql, int flags) throws SQLException

Execute a query, passing additional query flags.

Parameters
sql:String

the query to execute (JDBC-style query)

flags:int

additional QueryExecutor flags for execution; these are bitwise-ORed into the default flags.

Returns:boolean

true if there is a result set

Exceptions
SQLException:
if something goes wrong.
executeWithFlagsback to summary
public boolean executeWithFlags(CachedQuery cachedQuery, int flags) throws SQLException

Execute a query, passing additional query flags.

Parameters
cachedQuery:CachedQuery

the query to execute (native to PostgreSQL)

flags:int

additional QueryExecutor flags for execution; these are bitwise-ORed into the default flags.

Returns:boolean

true if there is a result set

Exceptions
SQLException:
if something goes wrong.
executeWithFlagsback to summary
public boolean executeWithFlags(int flags) throws SQLException

Execute a prepared query, passing additional query flags.

Parameters
flags:int

additional QueryExecutor flags for execution; these are bitwise-ORed into the default flags.

Returns:boolean

true if there is a result set

Exceptions
SQLException:
if something goes wrong.