public class MariaDbFunctionStatement extends CallableFunctionStatement implements CloneableCallableStatement
parameterMetadata, params
parameterList, prepareResult
autoGeneratedKeys, hasLongData, SPEC_ISO_ZONED_DATE_TIME, useFractionalSeconds
batchQueries, canUseServerTimeout, closed, connection, fetchSize, lock, maxRows, mustCloseOnCompletion, options, protocol, queryTimeout, results, resultSetConcurrency, resultSetScrollType, timerTaskFuture, warningsCleared
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
Constructor and Description |
---|
MariaDbFunctionStatement(MariaDbConnection connection,
String databaseName,
String procedureName,
String arguments,
int resultSetType,
int resultSetConcurrency)
Specific implementation of CallableStatement to handle function call, represent by call like
{?
|
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. |
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() |
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, nameToIndex, 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, wasNull
addBatch, addBatch, clearBatch, clearParameters, close, executeBatch, executeInternal, executeInternalBatch, executeLargeBatch, getMetaData, getParameterCount, getPrepareResult, toString
executeLargeUpdate, 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, setInternalObject, 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, setURL
cancel, checkClose, checkCloseOnCompletion, clearWarnings, closeOnCompletion, execute, execute, execute, execute, executeBatchEpilogue, executeBatchExceptionEpilogue, executeEpilogue, executeExceptionEpilogue, executeInternal, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeQueryPrologue, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getProtocol, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getServerThreadId, getUpdateCount, getWarnings, handleFailoverAndTimeout, internalBatchExecution, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, setTimerTask, skipMoreResults, stopTimeoutTask, testExecute, unloadDriver, unwrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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, 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, wasNull
addBatch, 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, setURL
addBatch, 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, setQueryTimeout
isWrapperFor, unwrap
public MariaDbFunctionStatement(MariaDbConnection connection, String databaseName, String procedureName, String arguments, int resultSetType, int resultSetConcurrency) throws 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_SENSITIVE
resultSetConcurrency
- a concurrency type; one of ResultSet.CONCUR_READ_ONLY
or
ResultSet.CONCUR_UPDATABLE
SQLException
- exceptionprotected SelectResultSet getResult() throws SQLException
getResult
in class CallableFunctionStatement
SQLException
public MariaDbFunctionStatement clone(MariaDbConnection connection) throws CloneNotSupportedException
clone
in interface CloneableCallableStatement
clone
in class CallableFunctionStatement
connection
- connectionCloneNotSupportedException
- if any error occur.public int executeUpdate() throws SQLException
executeUpdate
in interface PreparedStatement
executeUpdate
in class MariaDbPreparedStatementClient
SQLException
- if a database access error occurs; this method is called on a closed
PreparedStatement
or the SQL statement returns a
ResultSet
objectpublic void setParameter(int parameterIndex, ParameterHolder holder) throws SQLException
MariaDbPreparedStatementClient
setParameter
in class MariaDbPreparedStatementClient
parameterIndex
- indexholder
- parameter holderSQLException
- if index position doesn't correspond to query parameterspublic ResultSet executeQuery() throws SQLException
MariaDbPreparedStatementClient
PreparedStatement
object
and returns the ResultSet
object generated by the query.executeQuery
in interface PreparedStatement
executeQuery
in class MariaDbPreparedStatementClient
ResultSet
object that contains the data produced by the
query; never null
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 SQLException
MariaDbPreparedStatementClient
PreparedStatement
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 PreparedStatement
execute
in class MariaDbPreparedStatementClient
true
if the first result is a ResultSet
object; false
if the first result is an update
count or there is no resultSQLException
- 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()
Copyright © 2017. All rights reserved.