jxDBCon 0.9z

org.sourceforge.jxdbcon.postgresql
Class PGPreparedStatement

java.lang.Object
  |
  +--org.sourceforge.jxdbcon.AbstractStatement
        |
        +--org.sourceforge.jxdbcon.AbstractPreparedStatement
              |
              +--org.sourceforge.jxdbcon.postgresql.PGPreparedStatement
All Implemented Interfaces:
PreparedStatement, Statement

public class PGPreparedStatement
extends AbstractPreparedStatement

PGPreparedStatement implements PreparedStatement.

Version:
$Revision: 1.15 $
Author:
Keve Müller

Field Summary
private  EscapeContext ectx
           
private  EscapeFrags.FragList frags
           
private  DefaultResultSetMetaData prsmeta
           
private  PGExecResult res
           
private  String sql
           
private  String tableName
           
 
Fields inherited from class org.sourceforge.jxdbcon.AbstractPreparedStatement
paramBuf, paramContext, paramTypes
 
Fields inherited from class org.sourceforge.jxdbcon.AbstractStatement
batch, conn, cursorName, escapeProcessing, fetchDirection, fetchSize, maxFieldSize, maxRows, queryTimeout, warnings
 
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
 
Constructor Summary
PGPreparedStatement(PGConnection conn, int resultSetType, String sql)
           
 
Method Summary
 void addBatch()
           
private  DefaultResultSetMetaData analyzeTarget(ArrayList lst, Map relidMap)
           
 void cancel()
           
 void close()
           
 boolean execute()
          Execute the statement.
 boolean execute(String sql)
           
 int[] executeBatch()
          Not supported.
 ResultSet getGeneratedKeys()
          Not supported.
 ResultSetMetaData getMetaData()
           
 ResultSet getResultSet()
           
 int getUpdateCount()
           
 
Methods inherited from class org.sourceforge.jxdbcon.AbstractPreparedStatement
clearParameters, executeQuery, executeUpdate, getParameterMetaData, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setURL
 
Methods inherited from class org.sourceforge.jxdbcon.AbstractStatement
addBatch, clearBatch, clearWarnings, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finalize, getConnection, getCursorName, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isClosed, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.PreparedStatement
setUnicodeStream
 
Methods inherited from interface java.sql.Statement
addBatch, clearBatch, clearWarnings, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setMaxFieldSize, setMaxRows, setQueryTimeout
 

Field Detail

ectx

private EscapeContext ectx

frags

private EscapeFrags.FragList frags

prsmeta

private DefaultResultSetMetaData prsmeta

res

private PGExecResult res

sql

private String sql

tableName

private String tableName
Constructor Detail

PGPreparedStatement

public PGPreparedStatement(PGConnection conn,
                           int resultSetType,
                           String sql)
                    throws SQLException
Method Detail

addBatch

public void addBatch()
              throws SQLException
Specified by:
addBatch in interface PreparedStatement
Overrides:
addBatch in class AbstractPreparedStatement
SQLException

analyzeTarget

private DefaultResultSetMetaData analyzeTarget(ArrayList lst,
                                               Map relidMap)

cancel

public void cancel()
            throws SQLException
Specified by:
cancel in interface Statement
Overrides:
cancel in class AbstractStatement
SQLException

close

public void close()
Specified by:
close in interface Statement
Overrides:
close in class AbstractStatement

execute

public boolean execute()
                throws SQLException
Description copied from class: AbstractPreparedStatement
Execute the statement. This method checks whether all parameters are set. Any overriding class should run this first and then do whatever is needed to execute the query.

Specified by:
execute in interface PreparedStatement
Overrides:
execute in class AbstractPreparedStatement
SQLException

execute

public boolean execute(String sql)
                throws SQLException
SQLException

executeBatch

public int[] executeBatch()
                   throws SQLException
Description copied from class: AbstractStatement
Not supported.

Specified by:
executeBatch in interface Statement
Overrides:
executeBatch in class AbstractStatement
SQLException

getGeneratedKeys

public ResultSet getGeneratedKeys()
                           throws SQLException
Description copied from class: AbstractStatement
Not supported.

Specified by:
getGeneratedKeys in interface Statement
Overrides:
getGeneratedKeys in class AbstractStatement
SQLException

getMetaData

public ResultSetMetaData getMetaData()

getResultSet

public ResultSet getResultSet()
                       throws SQLException
Specified by:
getResultSet in interface Statement
Specified by:
getResultSet in class AbstractStatement
SQLException

getUpdateCount

public int getUpdateCount()
                   throws SQLException
Specified by:
getUpdateCount in interface Statement
Specified by:
getUpdateCount in class AbstractStatement
SQLException

jxDBCon 0.9z

Copyright © 2001,2002 Keve Müller; see LICENSE file for details.