|
jxDBCon 0.9z | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.sourceforge.jxdbcon.AbstractStatement
|
+--org.sourceforge.jxdbcon.AbstractPreparedStatement
|
+--org.sourceforge.jxdbcon.AbstractCallableStatement
|
+--org.sourceforge.jxdbcon.postgresql.PGCallableStatement
The PGCallableStatement implements CallableStatements with PostgreSQL.
There are two ways to call a function, by name or by oid.
{?=call version() }, or {?=call 89()}
When calling by name all functions with given name and equal parameter
list length are selected. Then heuristics are used to select the function
to use.
Currently the heuristics select the first matching function.
| Field Summary | |
private EscapeFrags.Frag[] |
args
The arguments of the call for evaluating functions that return a set. |
private EscapeContext |
ectx
The EscapeContext for evaluating functions that return a set. |
private PGFunc |
func
Selected function. |
private PGExecResult |
res
The Result from a function returning a set. |
| Fields inherited from class org.sourceforge.jxdbcon.AbstractCallableStatement |
call, resContext, resData, resTypes |
| 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 | |
PGCallableStatement(PGConnection conn,
int resultSetType,
String sql)
|
|
| Method Summary | |
void |
addBatch()
|
void |
close()
Null everything. |
boolean |
execute()
Execute the call either via FastPath or an SQL SELECT statement. |
boolean |
execute(String sql)
Not supported. |
int[] |
executeBatch()
Execute a batch update. |
private boolean |
executeCallFunc()
Execute a function that returns a scalar. |
private boolean |
executeCallSet()
Execute a function that returns a set. |
ResultSetMetaData |
getMetaData()
Not supported yet. |
protected AbstractType |
getParamType(int idx)
|
ResultSet |
getResultSet()
If the function returned a set, this method can be used to access it. |
int |
getUpdateCount()
Return the scalar result as the update count. |
| Methods inherited from class org.sourceforge.jxdbcon.AbstractCallableStatement |
findParameter, getArray, getArray, getBigDecimal, getBigDecimal, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getClob, getClob, getDate, getDate, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getObject, getObject, getObject, getObject, getRef, getRef, getShort, getShort, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getURL, getURL, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, setAsciiStream, setBigDecimal, setBinaryStream, setBoolean, setByte, setBytes, setCharacterStream, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, wasNull |
| 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, cancel, clearBatch, clearWarnings, execute, execute, execute, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, finalize, getConnection, getCursorName, getFetchDirection, getFetchSize, getGeneratedKeys, 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.CallableStatement |
getBigDecimal |
| Methods inherited from interface java.sql.PreparedStatement |
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, setUnicodeStream, setURL |
| Field Detail |
private EscapeFrags.Frag[] args
private EscapeContext ectx
private PGFunc func
private PGExecResult res
| Constructor Detail |
public PGCallableStatement(PGConnection conn,
int resultSetType,
String sql)
throws SQLException
| Method Detail |
public void addBatch()
throws SQLException
addBatch in interface PreparedStatementaddBatch in class AbstractPreparedStatementSQLExceptionpublic void close()
close in interface Statementclose in class AbstractStatement
public boolean execute()
throws SQLException
execute in interface PreparedStatementexecute in class AbstractPreparedStatementSQLException
public boolean execute(String sql)
throws SQLException
SQLException
public int[] executeBatch()
throws SQLException
executeBatch in interface StatementexecuteBatch in class AbstractStatementSQLException
private boolean executeCallFunc()
throws SQLException
SQLException
private boolean executeCallSet()
throws SQLException
SQLException
public ResultSetMetaData getMetaData()
throws SQLException
SQLException
protected AbstractType getParamType(int idx)
throws SQLException
SQLException
public ResultSet getResultSet()
throws SQLException
getResultSet in interface StatementgetResultSet in class AbstractStatementSQLException
public int getUpdateCount()
throws SQLException
getUpdateCount in interface StatementgetUpdateCount in class AbstractStatementSQLException
|
jxDBCon 0.9z | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||