public class MariaDbFunctionStatement extends CallableFunctionStatement implements CloneableCallableStatement
| Modifier and Type | Field and Description |
|---|---|
private SelectResultSet |
outputResultSet |
parameterMetadataautoGeneratedKeys, SPEC_ISO_ZONED_DATE_TIMEcanUseServerTimeout, closed, connection, exceptionFactory, executing, fetchSize, lock, maxRows, options, protocol, queryTimeout, results, resultSetConcurrency, resultSetScrollType| Constructor and Description |
|---|
MariaDbFunctionStatement(MariaDbConnection connection,
java.lang.String databaseName,
java.lang.String procedureName,
java.lang.String arguments,
int resultSetType,
int resultSetConcurrency,
ExceptionFactory exceptionFactory)
Specific implementation of CallableStatement to handle function call, represent by call like
{?= call procedure-name[(arg1,arg2, ...)]}.
|
| Modifier and Type | Method and Description |
|---|---|
MariaDbFunctionStatement |
clone(MariaDbConnection connection)
Clone statement.
|
boolean |
execute()
Executes the SQL statement in this
PreparedStatement object, which may be any kind
of SQL statement. |
java.sql.ResultSet |
executeQuery()
Executes the SQL query in this
PreparedStatement object and returns the
ResultSet object generated by the query. |
int |
executeUpdate()
Executes the CALL statement.
|
protected SelectResultSet |
getResult() |
private void |
retrieveOutputResult() |
void |
setParameter(int parameterIndex,
ParameterHolder holder)
Set parameter.
|
getArray, getArray, getBigDecimal, getBigDecimal, getBigDecimal, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getDate, getDate, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getParameterMetaData, getRef, getRef, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getURL, getURL, initFunctionData, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, wasNulladdBatch, addBatch, clearBatch, clearParameters, close, executeBatch, executeInternal, executeLargeBatch, getMetaData, getParameterCount, getPrepareResult, getServerUpdateCounts, toStringexecuteLargeUpdate, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURLcancel, checkClose, checkCloseOnCompletion, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatchEpilogue, executeBatchExceptionEpilogue, executeEpilogue, executeExceptionEpilogue, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeQueryPrologue, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setTimerTask, skipMoreResults, testExecute, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetArray, getArray, getBigDecimal, getBigDecimal, getBigDecimal, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getDate, getDate, getDate, getDate, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getNCharacterStream, getNCharacterStream, getNClob, getNClob, getNString, getNString, getObject, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRowId, getRowId, getShort, getShort, getSQLXML, getSQLXML, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getURL, getURL, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, registerOutParameter, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, wasNulladdBatch, clearParameters, executeLargeUpdate, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURLaddBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutprivate SelectResultSet outputResultSet
public MariaDbFunctionStatement(MariaDbConnection connection, java.lang.String databaseName, java.lang.String procedureName, java.lang.String arguments, int resultSetType, int resultSetConcurrency, ExceptionFactory exceptionFactory) throws java.sql.SQLException
connection - current connectiondatabaseName - database nameprocedureName - function namearguments - function argsresultSetType - a result set type; one of ResultSet.TYPE_FORWARD_ONLY,
ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVEresultSetConcurrency - a concurrency type; one of ResultSet.CONCUR_READ_ONLY
or ResultSet.CONCUR_UPDATABLEexceptionFactory - Exception factoryjava.sql.SQLException - exceptionprotected SelectResultSet getResult() throws java.sql.SQLException
getResult in class CallableFunctionStatementjava.sql.SQLExceptionpublic MariaDbFunctionStatement clone(MariaDbConnection connection) throws java.lang.CloneNotSupportedException
clone in interface CloneableCallableStatementclone in class CallableFunctionStatementconnection - connectionjava.lang.CloneNotSupportedException - if any error occur.public int executeUpdate()
throws java.sql.SQLException
executeUpdate in interface java.sql.PreparedStatementexecuteUpdate in class ClientSidePreparedStatementjava.sql.SQLException - if a database access error occurs; this method is called on a closed
PreparedStatement or the SQL statement returns a ResultSet objectprivate void retrieveOutputResult()
throws java.sql.SQLException
java.sql.SQLExceptionpublic void setParameter(int parameterIndex,
ParameterHolder holder)
throws java.sql.SQLException
ClientSidePreparedStatementsetParameter in class ClientSidePreparedStatementparameterIndex - indexholder - parameter holderjava.sql.SQLException - if index position doesn't correspond to query parameterspublic java.sql.ResultSet executeQuery()
throws java.sql.SQLException
ClientSidePreparedStatementPreparedStatement object and returns the
ResultSet object generated by the query.executeQuery in interface java.sql.PreparedStatementexecuteQuery in class ClientSidePreparedStatementResultSet object that contains the data produced by the query; never
nulljava.sql.SQLException - if a database access error occurs; this method is called on a closed
PreparedStatement or the SQL statement does not return a ResultSet
objectpublic boolean execute()
throws java.sql.SQLException
ClientSidePreparedStatementPreparedStatement object, which may be any kind
of SQL statement. Some prepared statements return multiple results; the execute
method handles these complex statements as well as the simpler form of statements handled by
the methods executeQuery and executeUpdate. execute method returns a boolean to indicate the form of the
first result. You must call either the method getResultSet or getUpdateCount
to retrieve the result; you must call getInternalMoreResults to move to
any subsequent result(s).execute in interface java.sql.PreparedStatementexecute in class ClientSidePreparedStatementtrue if the first result is a ResultSet object; false
if the first result is an update count or there is no resultjava.sql.SQLException - if a database access error occurs; this method is called on a closed
PreparedStatement or an argument is supplied to this methodStatement.execute(java.lang.String),
Statement.getResultSet(),
Statement.getUpdateCount(),
Statement.getMoreResults()