public class MariaDbProcedureStatement extends AbstractCallableProcedureStatement implements CloneableCallableStatement
hasInOutParameters, hasOutParameters, outputParameterMapper, parameterMetadata, paramsuseFractionalSecondsbinaryData, connection, deleteEndSemicolonPattern, executionResult, fetchSize, firstRewrite, isRewriteable, protocol, resultSetScrollType, timerTaskCLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
MariaDbProcedureStatement(String query,
MariaDbConnection connection,
String database,
String procedureName)
Specific implementation of CallableStatement to handle function call, represent by call like
{?
|
| Modifier and Type | Method and Description |
|---|---|
MariaDbProcedureStatement |
clone()
Clone statement.
|
boolean |
execute() |
int[] |
executeBatch()
Submits a batch of send to the database for execution and if all send execute successfully, returns an
array of update counts.
|
int |
executeUpdate()
Executes the CALL statement.
|
protected MariaSelectResultSet |
getResult() |
protected void |
setParameter(int parameterIndex,
ParameterHolder holder) |
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, isNoBackslashEscapes, 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, setParametersVariables, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setURL, useFractionalSeconds, wasNulladdBatch, cal, clearBatch, clearParameters, close, executeInternal, executeQuery, getCurrentParameterHolder, getExecutionResult, getMetaData, getParameterCount, setCurrentParameterHolder, toString, validParameterssetArray, 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, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURLaddBatch, cacheMoreResults, cancel, checkClose, clearWarnings, closeOnCompletion, execute, execute, execute, execute, execute, executeQuery, executeQuery, executeQueryEpilog, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getInsertIncipit, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getProtocol, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isInsertRewriteable, isPoolable, isWrapperFor, retrieveCallableResult, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, skipMoreResults, stringToQuery, unloadDriver, unwrapequals, 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, executeQuery, 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, 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, setQueryTimeoutisWrapperFor, unwrappublic MariaDbProcedureStatement(String query, MariaDbConnection connection, String database, String procedureName) throws SQLException
query - queryconnection - current connectiondatabase - databaseprocedureName - procedure nameSQLException - exceptionprotected MariaSelectResultSet getResult() throws SQLException
getResult in class AbstractCallableProcedureStatementSQLExceptionpublic MariaDbProcedureStatement clone() throws CloneNotSupportedException
clone in interface CloneableCallableStatementclone in class AbstractCallableProcedureStatementCloneNotSupportedException - if any error occur.public int executeUpdate()
throws SQLException
executeUpdate in interface PreparedStatementexecuteUpdate in class MariaDbServerPreparedStatementSQLException - if a database access error occurs; this method is called on a closed
PreparedStatement or the SQL statement returns a
ResultSet objectprotected void setParameter(int parameterIndex,
ParameterHolder holder)
throws SQLException
setParameter in class MariaDbServerPreparedStatementSQLExceptionpublic boolean execute()
throws SQLException
execute in interface PreparedStatementexecute in class MariaDbServerPreparedStatementSQLExceptionpublic int[] executeBatch()
throws SQLException
MariaDbServerPreparedStatementSubmits a batch of send to the database for execution and if all send execute successfully, returns an
array of update counts. The int elements of the array that is returned are ordered to correspond to
the send in the batch, which are ordered according to the order in which they were added to the batch. The
elements in the array returned by the method executeBatch may be one of the following:
SUCCESS_NO_INFO -- indicates that the command was processed successfully but that the number of rows
affected is unknown.
If one of the send in a batch update fails to execute properly, this method throws a
BatchUpdateException, and a JDBC driver may or may not continue to process the remaining send in
the batch. However, the driver's behavior must be consistent with a particular DBMS, either always continuing to
process send or never continuing to process send. If the driver continues processing after a failure,
the array returned by the method BatchUpdateException.getUpdateCounts will contain as many elements
as there are send in the batch, and at least one of the elements will be the following:
EXECUTE_FAILED -- indicates that the command failed to execute successfully and
occurs only if a driver continues to process send after a command fails The possible implementations and return values have been modified in the Java 2 SDK, Standard Edition, version
1.3 to accommodate the option of continuing to proccess send in a batch update after a
BatchUpdateException object has been thrown.
executeBatch in interface StatementexecuteBatch in class MariaDbServerPreparedStatementSQLException - if a database access error occurs, this method is called on a closed
Statement or the driver does not support batch statements. Throws
BatchUpdateException (a subclass of SQLException) if
one of the send sent to the database fails to execute properly or attempts to
return a result set.MariaDbServerPreparedStatement.addBatch(),
DatabaseMetaData.supportsBatchUpdates()Copyright © 2016. All rights reserved.