类 CallableStatement
- java.lang.Object
-
- com.mysql.cj.jdbc.StatementImpl
-
- com.mysql.cj.jdbc.ClientPreparedStatement
-
- com.mysql.cj.jdbc.CallableStatement
-
- 所有已实现的接口:
JdbcPreparedStatement,JdbcStatement,Query,AutoCloseable,CallableStatement,PreparedStatement,Statement,Wrapper
public class CallableStatement extends ClientPreparedStatement implements CallableStatement
Representation of stored procedures for JDBC
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 protected static classCallableStatement.CallableStatementParamclassCallableStatement.CallableStatementParamInfo-
从接口继承的嵌套类/接口 com.mysql.cj.Query
Query.CancelStatus
-
-
字段概要
字段 修饰符和类型 字段 说明 protected booleanoutputParamWasNullprotected CallableStatement.CallableStatementParamInfoparamInfo-
从类继承的字段 com.mysql.cj.jdbc.ClientPreparedStatement
batchedValuesClause, batchHasPlainStatements, parameterMetaData, rewrittenBatchSize
-
从类继承的字段 com.mysql.cj.jdbc.StatementImpl
batchedGeneratedKeys, charEncoding, commandBuilder, connection, continueBatchOnError, doEscapeProcessing, dontCheckOnDuplicateKeyUpdateInSQL, dontTrackOpenResources, dumpQueriesOnException, exceptionInterceptor, generatedKeysResults, holdResultsOpenOverClose, isClosed, lastInsertId, lastQueryIsOnDupKeyUpdate, logSlowQueries, maxAllowedPacket, maxFieldSize, maxRows, openResults, pedantic, PING_MARKER, pingTarget, profileSQL, query, results, resultSetConcurrency, resultSetFactory, retrieveGeneratedKeys, rewriteBatchedStatements, session, updateCount, USES_VARIABLES_FALSE, USES_VARIABLES_TRUE, USES_VARIABLES_UNKNOWN, useUsageAdvisor, warningChain
-
从接口继承的字段 com.mysql.cj.jdbc.JdbcStatement
MAX_ROWS
-
-
构造器概要
构造器 构造器 说明 CallableStatement(JdbcConnection conn, CallableStatement.CallableStatementParamInfo paramInfo)Creates a new CallableStatementCallableStatement(JdbcConnection conn, String sql, String db, boolean isFunctionCall)Creates a new CallableStatement
-
方法概要
所有方法 静态方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voidaddBatch()protected booleancheckReadOnlySafeStatement()Check to see if the statement is safe for read-only replicas after failover.voidclearParameters()booleanexecute()int[]executeBatch()long[]executeLargeBatch()longexecuteLargeUpdate()ResultSetexecuteQuery()intexecuteUpdate()protected StringfixParameterName(String paramNameIn)Adds 'at' symbol to beginning of parameter names if needed.ArraygetArray(int i)ArraygetArray(String parameterName)BigDecimalgetBigDecimal(int parameterIndex)BigDecimalgetBigDecimal(int parameterIndex, int scale)已过时。BigDecimalgetBigDecimal(String parameterName)BlobgetBlob(int parameterIndex)BlobgetBlob(String parameterName)booleangetBoolean(int parameterIndex)booleangetBoolean(String parameterName)bytegetByte(int parameterIndex)bytegetByte(String parameterName)byte[]getBytes(int parameterIndex)byte[]getBytes(String parameterName)ReadergetCharacterStream(int parameterIndex)ReadergetCharacterStream(String parameterName)ClobgetClob(int parameterIndex)ClobgetClob(String parameterName)DategetDate(int parameterIndex)DategetDate(int parameterIndex, Calendar cal)DategetDate(String parameterName)DategetDate(String parameterName, Calendar cal)doublegetDouble(int parameterIndex)doublegetDouble(String parameterName)floatgetFloat(int parameterIndex)floatgetFloat(String parameterName)protected static CallableStatementgetInstance(JdbcConnection conn, CallableStatement.CallableStatementParamInfo paramInfo)Creates a callable statement instanceprotected static CallableStatementgetInstance(JdbcConnection conn, String sql, String db, boolean isFunctionCall)Creates a callable statement instanceintgetInt(int parameterIndex)intgetInt(String parameterName)longgetLong(int parameterIndex)longgetLong(String parameterName)protected intgetNamedParamIndex(String paramName, boolean forOut)ReadergetNCharacterStream(int parameterIndex)ReadergetNCharacterStream(String parameterName)NClobgetNClob(int parameterIndex)NClobgetNClob(String parameterName)StringgetNString(int parameterIndex)StringgetNString(String parameterName)ObjectgetObject(int parameterIndex)<T> TgetObject(int parameterIndex, Class<T> type)ObjectgetObject(int parameterIndex, Map<String,Class<?>> map)ObjectgetObject(String parameterName)<T> TgetObject(String parameterName, Class<T> type)ObjectgetObject(String parameterName, Map<String,Class<?>> map)protected ResultSetInternalMethodsgetOutputParameters(int paramIndex)Returns the ResultSet that holds the output parameters, or throws an appropriate exception if none exist, or they weren't returned.protected intgetParameterIndexOffset()For calling stored functions, this will be -1 as Connector/J does not count the first '?'ParameterMetaDatagetParameterMetaData()RefgetRef(int parameterIndex)RefgetRef(String parameterName)RowIdgetRowId(int parameterIndex)RowIdgetRowId(String parameterName)shortgetShort(int parameterIndex)shortgetShort(String parameterName)SQLXMLgetSQLXML(int parameterIndex)SQLXMLgetSQLXML(String parameterName)StringgetString(int parameterIndex)StringgetString(String parameterName)TimegetTime(int parameterIndex)TimegetTime(int parameterIndex, Calendar cal)TimegetTime(String parameterName)TimegetTime(String parameterName, Calendar cal)TimestampgetTimestamp(int parameterIndex)TimestampgetTimestamp(int parameterIndex, Calendar cal)TimestampgetTimestamp(String parameterName)TimestampgetTimestamp(String parameterName, Calendar cal)URLgetURL(int parameterIndex)URLgetURL(String parameterName)protected intmapOutputParameterIndexToRsIndex(int paramIndex)voidregisterOutParameter(int parameterIndex, int sqlType)voidregisterOutParameter(int parameterIndex, int sqlType, int scale)voidregisterOutParameter(int parameterIndex, int sqlType, String typeName)protected voidregisterOutParameter(int parameterIndex, MysqlType mysqlType)protected voidregisterOutParameter(int parameterIndex, MysqlType mysqlType, int scale)protected voidregisterOutParameter(int parameterIndex, MysqlType mysqlType, String typeName)voidregisterOutParameter(int parameterIndex, SQLType sqlType)voidregisterOutParameter(int parameterIndex, SQLType sqlType, int scale)voidregisterOutParameter(int parameterIndex, SQLType sqlType, String typeName)voidregisterOutParameter(String parameterName, int sqlType)voidregisterOutParameter(String parameterName, int sqlType, int scale)voidregisterOutParameter(String parameterName, int sqlType, String typeName)voidregisterOutParameter(String parameterName, SQLType sqlType)voidregisterOutParameter(String parameterName, SQLType sqlType, int scale)voidregisterOutParameter(String parameterName, SQLType sqlType, String typeName)protected byte[]s2b(String s)Converts the given string to bytes, using the connection's character encoding.voidsetAsciiStream(String parameterName, InputStream x)voidsetAsciiStream(String parameterName, InputStream x, int length)voidsetAsciiStream(String parameterName, InputStream x, long length)voidsetBigDecimal(String parameterName, BigDecimal x)voidsetBinaryStream(String parameterName, InputStream x)voidsetBinaryStream(String parameterName, InputStream x, int length)voidsetBinaryStream(String parameterName, InputStream x, long length)voidsetBlob(String parameterName, InputStream inputStream)voidsetBlob(String parameterName, InputStream inputStream, long length)voidsetBlob(String parameterName, Blob x)voidsetBoolean(String parameterName, boolean x)voidsetByte(String parameterName, byte x)voidsetBytes(String parameterName, byte[] x)voidsetCharacterStream(String parameterName, Reader reader)voidsetCharacterStream(String parameterName, Reader reader, int length)voidsetCharacterStream(String parameterName, Reader reader, long length)voidsetClob(String parameterName, Reader reader)voidsetClob(String parameterName, Reader reader, long length)voidsetClob(String parameterName, Clob x)voidsetDate(String parameterName, Date x)voidsetDate(String parameterName, Date x, Calendar cal)voidsetDouble(String parameterName, double x)voidsetFloat(String parameterName, float x)voidsetInt(String parameterName, int x)voidsetLong(String parameterName, long x)voidsetNCharacterStream(String parameterName, Reader value)voidsetNCharacterStream(String parameterName, Reader value, long length)voidsetNClob(String parameterName, Reader reader)voidsetNClob(String parameterName, Reader reader, long length)voidsetNClob(String parameterName, NClob value)voidsetNString(String parameterName, String value)voidsetNull(String parameterName, int sqlType)voidsetNull(String parameterName, int sqlType, String typeName)voidsetObject(String parameterName, Object x)voidsetObject(String parameterName, Object x, int targetSqlType)voidsetObject(String parameterName, Object x, int targetSqlType, int scale)voidsetObject(String parameterName, Object x, SQLType targetSqlType)voidsetObject(String parameterName, Object x, SQLType targetSqlType, int scaleOrLength)voidsetRowId(String parameterName, RowId x)voidsetShort(String parameterName, short x)voidsetSQLXML(String parameterName, SQLXML xmlObject)voidsetString(String parameterName, String x)voidsetTime(String parameterName, Time x)voidsetTime(String parameterName, Time x, Calendar cal)voidsetTimestamp(String parameterName, Timestamp x)voidsetTimestamp(String parameterName, Timestamp x, Calendar cal)voidsetURL(String parameterName, URL val)booleanwasNull()-
从类继承的方法 com.mysql.cj.jdbc.ClientPreparedStatement
addBatch, checkBounds, clearBatch, containsOnDuplicateKeyUpdate, executeBatchedInserts, executeBatchInternal, executeBatchSerially, executeInternal, executePreparedBatchAsMultiStatement, executeUpdateInternal, executeUpdateInternal, getBytesRepresentation, getCoreParameterIndex, getInstance, getInstance, getMetaData, getParameterBindings, getPreparedSql, getQueryBindings, getQueryInfo, getUpdateCount, initQuery, isNull, isResultSetProducingQuery, prepareBatchedInsertSQL, realClose, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBigInteger, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, 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, setOneBatchedParameterSet, setRef, setRetrieveGeneratedKeys, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, toString
-
从类继承的方法 com.mysql.cj.jdbc.StatementImpl
addBatch, cancel, checkCancelTimeout, checkClosed, checkNullOrEmptyQuery, clearAttributes, clearBatchedArgs, clearWarnings, close, closeAllOpenResults, closeOnCompletion, closeQuery, containsOnDuplicateKeyInString, createStreamingResultSet, disableStreamingResults, doPingInstead, enableStreamingResults, execute, execute, execute, execute, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeSimpleNonQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdateInternal, generatePingResultSet, getBatchedArgs, getBatchedGeneratedKeys, getBatchedGeneratedKeys, getCancelTimeoutMutex, getConnection, getCurrentDatabase, getExceptionInterceptor, getExecuteTime, getFetchDirection, getFetchSize, getGeneratedKeys, getGeneratedKeysInternal, getGeneratedKeysInternal, getId, getLargeMaxRows, getLargeUpdateCount, getLastInsertID, getLocalInfileInputStream, getLongUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getOpenResultSetCount, getQuery, getQueryAttributesBindings, getQueryTimeout, getResultFetchSize, getResultSet, getResultSetConcurrency, getResultSetFactory, getResultSetHoldability, getResultSetInternal, getResultSetType, getResultType, getServerStatementId, getSession, getStatementExecuting, getTimeoutInMillis, getWarnings, handleExceptionForBatch, hasDeadlockOrTimeoutRolledBackTx, implicitlyCloseAllOpenResults, isClearWarningsCalled, isClosed, isCloseOnCompletion, isNonResultSetProducingQuery, isPoolable, isResultSetProducingQuery, isWrapperFor, processMultiCountsAndKeys, removeOpenResultSet, resetCancelledState, setAttribute, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setCursorName, setEscapeProcessing, setExecuteTime, setFetchDirection, setFetchSize, setHoldResultsOpenOverClose, setLargeMaxRows, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPingTarget, setPoolable, setQueryTimeout, setResultFetchSize, setResultType, setTimeoutInMillis, setupStreamingTimeout, startQueryTimer, statementBegins, stopQueryTimer, unwrap
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 com.mysql.cj.jdbc.JdbcStatement
clearAttributes, disableStreamingResults, enableStreamingResults, getExceptionInterceptor, getLocalInfileInputStream, getOpenResultSetCount, getQuery, getResultSetInternal, removeOpenResultSet, setAttribute, setHoldResultsOpenOverClose, setLocalInfileInputStream, setPingTarget
-
从接口继承的方法 java.sql.PreparedStatement
getMetaData, 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
-
从接口继承的方法 com.mysql.cj.Query
addBatch, checkCancelTimeout, clearBatchedArgs, closeQuery, getBatchedArgs, getCancelTimeoutMutex, getCurrentDatabase, getExecuteTime, getId, getQueryAttributesBindings, getResultFetchSize, getResultSetFactory, getResultType, getSession, getStatementExecuting, getTimeoutInMillis, isClearWarningsCalled, resetCancelledState, setCancelStatus, setClearWarningsCalled, setCurrentDatabase, setExecuteTime, setResultFetchSize, setResultType, setTimeoutInMillis, startQueryTimer, statementBegins, stopQueryTimer
-
从接口继承的方法 java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, 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, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
-
从接口继承的方法 java.sql.Wrapper
isWrapperFor, unwrap
-
-
-
-
字段详细资料
-
outputParamWasNull
protected boolean outputParamWasNull
-
paramInfo
protected CallableStatement.CallableStatementParamInfo paramInfo
-
-
构造器详细资料
-
CallableStatement
public CallableStatement(JdbcConnection conn, CallableStatement.CallableStatementParamInfo paramInfo) throws SQLException
Creates a new CallableStatement- 参数:
conn- the connection creating this statementparamInfo- the SQL to prepare- 抛出:
SQLException- if an error occurs
-
CallableStatement
public CallableStatement(JdbcConnection conn, String sql, String db, boolean isFunctionCall) throws SQLException
Creates a new CallableStatement- 参数:
conn- the connection creating this statementsql- the SQL to preparedb- the current databaseisFunctionCall- is it a function call or a procedure call?- 抛出:
SQLException- if an error occurs
-
-
方法详细资料
-
getInstance
protected static CallableStatement getInstance(JdbcConnection conn, String sql, String db, boolean isFunctionCall) throws SQLException
Creates a callable statement instance- 参数:
conn- the connection creating this statementsql- the SQL to preparedb- the current databaseisFunctionCall- is it a function call or a procedure call?- 返回:
- CallableStatement
- 抛出:
SQLException- if an error occurs
-
getInstance
protected static CallableStatement getInstance(JdbcConnection conn, CallableStatement.CallableStatementParamInfo paramInfo) throws SQLException
Creates a callable statement instance- 参数:
conn- the connection creating this statementparamInfo- the SQL to prepare- 返回:
- CallableStatement
- 抛出:
SQLException- if an error occurs
-
addBatch
public void addBatch() throws SQLException- 指定者:
addBatch在接口中PreparedStatement- 覆盖:
addBatch在类中ClientPreparedStatement- 抛出:
SQLException
-
clearParameters
public void clearParameters() throws SQLException- 指定者:
clearParameters在接口中PreparedStatement- 覆盖:
clearParameters在类中ClientPreparedStatement- 抛出:
SQLException
-
execute
public boolean execute() throws SQLException- 指定者:
execute在接口中PreparedStatement- 覆盖:
execute在类中ClientPreparedStatement- 抛出:
SQLException
-
executeQuery
public ResultSet executeQuery() throws SQLException
- 指定者:
executeQuery在接口中PreparedStatement- 覆盖:
executeQuery在类中ClientPreparedStatement- 抛出:
SQLException
-
executeUpdate
public int executeUpdate() throws SQLException- 指定者:
executeUpdate在接口中PreparedStatement- 覆盖:
executeUpdate在类中ClientPreparedStatement- 抛出:
SQLException
-
fixParameterName
protected String fixParameterName(String paramNameIn) throws SQLException
Adds 'at' symbol to beginning of parameter names if needed.- 参数:
paramNameIn- the parameter name to 'fix'- 返回:
- the parameter name with an 'a' prepended, if needed
- 抛出:
SQLException- if the parameter name is null or empty.
-
getArray
public Array getArray(int i) throws SQLException
- 指定者:
getArray在接口中CallableStatement- 抛出:
SQLException
-
getArray
public Array getArray(String parameterName) throws SQLException
- 指定者:
getArray在接口中CallableStatement- 抛出:
SQLException
-
getBigDecimal
public BigDecimal getBigDecimal(int parameterIndex) throws SQLException
- 指定者:
getBigDecimal在接口中CallableStatement- 抛出:
SQLException
-
getBigDecimal
@Deprecated public BigDecimal getBigDecimal(int parameterIndex, int scale) throws SQLException
已过时。- 指定者:
getBigDecimal在接口中CallableStatement- 抛出:
SQLException
-
getBigDecimal
public BigDecimal getBigDecimal(String parameterName) throws SQLException
- 指定者:
getBigDecimal在接口中CallableStatement- 抛出:
SQLException
-
getBlob
public Blob getBlob(int parameterIndex) throws SQLException
- 指定者:
getBlob在接口中CallableStatement- 抛出:
SQLException
-
getBlob
public Blob getBlob(String parameterName) throws SQLException
- 指定者:
getBlob在接口中CallableStatement- 抛出:
SQLException
-
getBoolean
public boolean getBoolean(int parameterIndex) throws SQLException- 指定者:
getBoolean在接口中CallableStatement- 抛出:
SQLException
-
getBoolean
public boolean getBoolean(String parameterName) throws SQLException
- 指定者:
getBoolean在接口中CallableStatement- 抛出:
SQLException
-
getByte
public byte getByte(int parameterIndex) throws SQLException- 指定者:
getByte在接口中CallableStatement- 抛出:
SQLException
-
getByte
public byte getByte(String parameterName) throws SQLException
- 指定者:
getByte在接口中CallableStatement- 抛出:
SQLException
-
getBytes
public byte[] getBytes(int parameterIndex) throws SQLException- 指定者:
getBytes在接口中CallableStatement- 抛出:
SQLException
-
getBytes
public byte[] getBytes(String parameterName) throws SQLException
- 指定者:
getBytes在接口中CallableStatement- 抛出:
SQLException
-
getClob
public Clob getClob(int parameterIndex) throws SQLException
- 指定者:
getClob在接口中CallableStatement- 抛出:
SQLException
-
getClob
public Clob getClob(String parameterName) throws SQLException
- 指定者:
getClob在接口中CallableStatement- 抛出:
SQLException
-
getDate
public Date getDate(int parameterIndex) throws SQLException
- 指定者:
getDate在接口中CallableStatement- 抛出:
SQLException
-
getDate
public Date getDate(int parameterIndex, Calendar cal) throws SQLException
- 指定者:
getDate在接口中CallableStatement- 抛出:
SQLException
-
getDate
public Date getDate(String parameterName) throws SQLException
- 指定者:
getDate在接口中CallableStatement- 抛出:
SQLException
-
getDate
public Date getDate(String parameterName, Calendar cal) throws SQLException
- 指定者:
getDate在接口中CallableStatement- 抛出:
SQLException
-
getDouble
public double getDouble(int parameterIndex) throws SQLException- 指定者:
getDouble在接口中CallableStatement- 抛出:
SQLException
-
getDouble
public double getDouble(String parameterName) throws SQLException
- 指定者:
getDouble在接口中CallableStatement- 抛出:
SQLException
-
getFloat
public float getFloat(int parameterIndex) throws SQLException- 指定者:
getFloat在接口中CallableStatement- 抛出:
SQLException
-
getFloat
public float getFloat(String parameterName) throws SQLException
- 指定者:
getFloat在接口中CallableStatement- 抛出:
SQLException
-
getInt
public int getInt(int parameterIndex) throws SQLException- 指定者:
getInt在接口中CallableStatement- 抛出:
SQLException
-
getInt
public int getInt(String parameterName) throws SQLException
- 指定者:
getInt在接口中CallableStatement- 抛出:
SQLException
-
getLong
public long getLong(int parameterIndex) throws SQLException- 指定者:
getLong在接口中CallableStatement- 抛出:
SQLException
-
getLong
public long getLong(String parameterName) throws SQLException
- 指定者:
getLong在接口中CallableStatement- 抛出:
SQLException
-
getNamedParamIndex
protected int getNamedParamIndex(String paramName, boolean forOut) throws SQLException
- 抛出:
SQLException
-
getObject
public Object getObject(int parameterIndex) throws SQLException
- 指定者:
getObject在接口中CallableStatement- 抛出:
SQLException
-
getObject
public Object getObject(int parameterIndex, Map<String,Class<?>> map) throws SQLException
- 指定者:
getObject在接口中CallableStatement- 抛出:
SQLException
-
getObject
public Object getObject(String parameterName) throws SQLException
- 指定者:
getObject在接口中CallableStatement- 抛出:
SQLException
-
getObject
public Object getObject(String parameterName, Map<String,Class<?>> map) throws SQLException
- 指定者:
getObject在接口中CallableStatement- 抛出:
SQLException
-
getObject
public <T> T getObject(int parameterIndex, Class<T> type) throws SQLException- 指定者:
getObject在接口中CallableStatement- 抛出:
SQLException
-
getObject
public <T> T getObject(String parameterName, Class<T> type) throws SQLException
- 指定者:
getObject在接口中CallableStatement- 抛出:
SQLException
-
getOutputParameters
protected ResultSetInternalMethods getOutputParameters(int paramIndex) throws SQLException
Returns the ResultSet that holds the output parameters, or throws an appropriate exception if none exist, or they weren't returned.- 参数:
paramIndex- parameter index- 返回:
- the ResultSet that holds the output parameters
- 抛出:
SQLException- if no output parameters were defined, or if no output parameters were returned.
-
getParameterMetaData
public ParameterMetaData getParameterMetaData() throws SQLException
- 指定者:
getParameterMetaData在接口中PreparedStatement- 覆盖:
getParameterMetaData在类中ClientPreparedStatement- 抛出:
SQLException
-
getRef
public Ref getRef(int parameterIndex) throws SQLException
- 指定者:
getRef在接口中CallableStatement- 抛出:
SQLException
-
getRef
public Ref getRef(String parameterName) throws SQLException
- 指定者:
getRef在接口中CallableStatement- 抛出:
SQLException
-
getShort
public short getShort(int parameterIndex) throws SQLException- 指定者:
getShort在接口中CallableStatement- 抛出:
SQLException
-
getShort
public short getShort(String parameterName) throws SQLException
- 指定者:
getShort在接口中CallableStatement- 抛出:
SQLException
-
getString
public String getString(int parameterIndex) throws SQLException
- 指定者:
getString在接口中CallableStatement- 抛出:
SQLException
-
getString
public String getString(String parameterName) throws SQLException
- 指定者:
getString在接口中CallableStatement- 抛出:
SQLException
-
getTime
public Time getTime(int parameterIndex) throws SQLException
- 指定者:
getTime在接口中CallableStatement- 抛出:
SQLException
-
getTime
public Time getTime(int parameterIndex, Calendar cal) throws SQLException
- 指定者:
getTime在接口中CallableStatement- 抛出:
SQLException
-
getTime
public Time getTime(String parameterName) throws SQLException
- 指定者:
getTime在接口中CallableStatement- 抛出:
SQLException
-
getTime
public Time getTime(String parameterName, Calendar cal) throws SQLException
- 指定者:
getTime在接口中CallableStatement- 抛出:
SQLException
-
getTimestamp
public Timestamp getTimestamp(int parameterIndex) throws SQLException
- 指定者:
getTimestamp在接口中CallableStatement- 抛出:
SQLException
-
getTimestamp
public Timestamp getTimestamp(int parameterIndex, Calendar cal) throws SQLException
- 指定者:
getTimestamp在接口中CallableStatement- 抛出:
SQLException
-
getTimestamp
public Timestamp getTimestamp(String parameterName) throws SQLException
- 指定者:
getTimestamp在接口中CallableStatement- 抛出:
SQLException
-
getTimestamp
public Timestamp getTimestamp(String parameterName, Calendar cal) throws SQLException
- 指定者:
getTimestamp在接口中CallableStatement- 抛出:
SQLException
-
getURL
public URL getURL(int parameterIndex) throws SQLException
- 指定者:
getURL在接口中CallableStatement- 抛出:
SQLException
-
getURL
public URL getURL(String parameterName) throws SQLException
- 指定者:
getURL在接口中CallableStatement- 抛出:
SQLException
-
mapOutputParameterIndexToRsIndex
protected int mapOutputParameterIndexToRsIndex(int paramIndex) throws SQLException- 抛出:
SQLException
-
registerOutParameter
protected void registerOutParameter(int parameterIndex, MysqlType mysqlType) throws SQLException- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType) throws SQLException- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, SQLType sqlType) throws SQLException- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
protected void registerOutParameter(int parameterIndex, MysqlType mysqlType, int scale) throws SQLException- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType, int scale) throws SQLException- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, SQLType sqlType, int scale) throws SQLException- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
protected void registerOutParameter(int parameterIndex, MysqlType mysqlType, String typeName) throws SQLException- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, int sqlType, String typeName) throws SQLException- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(int parameterIndex, SQLType sqlType, String typeName) throws SQLException- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, int sqlType) throws SQLException
- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, SQLType sqlType) throws SQLException
- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException
- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, SQLType sqlType, int scale) throws SQLException
- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, int sqlType, String typeName) throws SQLException
- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
registerOutParameter
public void registerOutParameter(String parameterName, SQLType sqlType, String typeName) throws SQLException
- 指定者:
registerOutParameter在接口中CallableStatement- 抛出:
SQLException
-
setAsciiStream
public void setAsciiStream(String parameterName, InputStream x, int length) throws SQLException
- 指定者:
setAsciiStream在接口中CallableStatement- 抛出:
SQLException
-
setBigDecimal
public void setBigDecimal(String parameterName, BigDecimal x) throws SQLException
- 指定者:
setBigDecimal在接口中CallableStatement- 抛出:
SQLException
-
setBinaryStream
public void setBinaryStream(String parameterName, InputStream x, int length) throws SQLException
- 指定者:
setBinaryStream在接口中CallableStatement- 抛出:
SQLException
-
setBoolean
public void setBoolean(String parameterName, boolean x) throws SQLException
- 指定者:
setBoolean在接口中CallableStatement- 抛出:
SQLException
-
setByte
public void setByte(String parameterName, byte x) throws SQLException
- 指定者:
setByte在接口中CallableStatement- 抛出:
SQLException
-
setBytes
public void setBytes(String parameterName, byte[] x) throws SQLException
- 指定者:
setBytes在接口中CallableStatement- 抛出:
SQLException
-
setCharacterStream
public void setCharacterStream(String parameterName, Reader reader, int length) throws SQLException
- 指定者:
setCharacterStream在接口中CallableStatement- 抛出:
SQLException
-
setDate
public void setDate(String parameterName, Date x) throws SQLException
- 指定者:
setDate在接口中CallableStatement- 抛出:
SQLException
-
setDate
public void setDate(String parameterName, Date x, Calendar cal) throws SQLException
- 指定者:
setDate在接口中CallableStatement- 抛出:
SQLException
-
setDouble
public void setDouble(String parameterName, double x) throws SQLException
- 指定者:
setDouble在接口中CallableStatement- 抛出:
SQLException
-
setFloat
public void setFloat(String parameterName, float x) throws SQLException
- 指定者:
setFloat在接口中CallableStatement- 抛出:
SQLException
-
setInt
public void setInt(String parameterName, int x) throws SQLException
- 指定者:
setInt在接口中CallableStatement- 抛出:
SQLException
-
setLong
public void setLong(String parameterName, long x) throws SQLException
- 指定者:
setLong在接口中CallableStatement- 抛出:
SQLException
-
setNull
public void setNull(String parameterName, int sqlType) throws SQLException
- 指定者:
setNull在接口中CallableStatement- 抛出:
SQLException
-
setNull
public void setNull(String parameterName, int sqlType, String typeName) throws SQLException
- 指定者:
setNull在接口中CallableStatement- 抛出:
SQLException
-
setObject
public void setObject(String parameterName, Object x) throws SQLException
- 指定者:
setObject在接口中CallableStatement- 抛出:
SQLException
-
setObject
public void setObject(String parameterName, Object x, int targetSqlType) throws SQLException
- 指定者:
setObject在接口中CallableStatement- 抛出:
SQLException
-
setObject
public void setObject(String parameterName, Object x, SQLType targetSqlType) throws SQLException
- 指定者:
setObject在接口中CallableStatement- 抛出:
SQLException
-
setObject
public void setObject(String parameterName, Object x, int targetSqlType, int scale) throws SQLException
- 指定者:
setObject在接口中CallableStatement- 抛出:
SQLException
-
setObject
public void setObject(String parameterName, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException
- 指定者:
setObject在接口中CallableStatement- 抛出:
SQLException
-
setShort
public void setShort(String parameterName, short x) throws SQLException
- 指定者:
setShort在接口中CallableStatement- 抛出:
SQLException
-
setString
public void setString(String parameterName, String x) throws SQLException
- 指定者:
setString在接口中CallableStatement- 抛出:
SQLException
-
setTime
public void setTime(String parameterName, Time x) throws SQLException
- 指定者:
setTime在接口中CallableStatement- 抛出:
SQLException
-
setTime
public void setTime(String parameterName, Time x, Calendar cal) throws SQLException
- 指定者:
setTime在接口中CallableStatement- 抛出:
SQLException
-
setTimestamp
public void setTimestamp(String parameterName, Timestamp x) throws SQLException
- 指定者:
setTimestamp在接口中CallableStatement- 抛出:
SQLException
-
setTimestamp
public void setTimestamp(String parameterName, Timestamp x, Calendar cal) throws SQLException
- 指定者:
setTimestamp在接口中CallableStatement- 抛出:
SQLException
-
setURL
public void setURL(String parameterName, URL val) throws SQLException
- 指定者:
setURL在接口中CallableStatement- 抛出:
SQLException
-
wasNull
public boolean wasNull() throws SQLException- 指定者:
wasNull在接口中CallableStatement- 抛出:
SQLException
-
executeBatch
public int[] executeBatch() throws SQLException- 指定者:
executeBatch在接口中Statement- 覆盖:
executeBatch在类中StatementImpl- 抛出:
SQLException
-
getParameterIndexOffset
protected int getParameterIndexOffset()
从类复制的说明:ClientPreparedStatementFor calling stored functions, this will be -1 as Connector/J does not count the first '?' parameter marker, but JDBC counts it * as 1, otherwise it will return 0- 覆盖:
getParameterIndexOffset在类中ClientPreparedStatement- 返回:
- offset
-
setAsciiStream
public void setAsciiStream(String parameterName, InputStream x) throws SQLException
- 指定者:
setAsciiStream在接口中CallableStatement- 抛出:
SQLException
-
setAsciiStream
public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException
- 指定者:
setAsciiStream在接口中CallableStatement- 抛出:
SQLException
-
setBinaryStream
public void setBinaryStream(String parameterName, InputStream x) throws SQLException
- 指定者:
setBinaryStream在接口中CallableStatement- 抛出:
SQLException
-
setBinaryStream
public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException
- 指定者:
setBinaryStream在接口中CallableStatement- 抛出:
SQLException
-
setBlob
public void setBlob(String parameterName, Blob x) throws SQLException
- 指定者:
setBlob在接口中CallableStatement- 抛出:
SQLException
-
setBlob
public void setBlob(String parameterName, InputStream inputStream) throws SQLException
- 指定者:
setBlob在接口中CallableStatement- 抛出:
SQLException
-
setBlob
public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException
- 指定者:
setBlob在接口中CallableStatement- 抛出:
SQLException
-
setCharacterStream
public void setCharacterStream(String parameterName, Reader reader) throws SQLException
- 指定者:
setCharacterStream在接口中CallableStatement- 抛出:
SQLException
-
setCharacterStream
public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException
- 指定者:
setCharacterStream在接口中CallableStatement- 抛出:
SQLException
-
setClob
public void setClob(String parameterName, Clob x) throws SQLException
- 指定者:
setClob在接口中CallableStatement- 抛出:
SQLException
-
setClob
public void setClob(String parameterName, Reader reader) throws SQLException
- 指定者:
setClob在接口中CallableStatement- 抛出:
SQLException
-
setClob
public void setClob(String parameterName, Reader reader, long length) throws SQLException
- 指定者:
setClob在接口中CallableStatement- 抛出:
SQLException
-
setNCharacterStream
public void setNCharacterStream(String parameterName, Reader value) throws SQLException
- 指定者:
setNCharacterStream在接口中CallableStatement- 抛出:
SQLException
-
setNCharacterStream
public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
- 指定者:
setNCharacterStream在接口中CallableStatement- 抛出:
SQLException
-
checkReadOnlySafeStatement
protected boolean checkReadOnlySafeStatement() throws SQLException从类复制的说明:ClientPreparedStatementCheck to see if the statement is safe for read-only replicas after failover.- 覆盖:
checkReadOnlySafeStatement在类中ClientPreparedStatement- 返回:
- true if safe for read-only.
- 抛出:
SQLException- if a database access error occurs or this method is called on a closed PreparedStatement
-
getRowId
public RowId getRowId(int parameterIndex) throws SQLException
- 指定者:
getRowId在接口中CallableStatement- 抛出:
SQLException
-
getRowId
public RowId getRowId(String parameterName) throws SQLException
- 指定者:
getRowId在接口中CallableStatement- 抛出:
SQLException
-
setRowId
public void setRowId(String parameterName, RowId x) throws SQLException
- 指定者:
setRowId在接口中CallableStatement- 抛出:
SQLException
-
setNString
public void setNString(String parameterName, String value) throws SQLException
- 指定者:
setNString在接口中CallableStatement- 抛出:
SQLException
-
setNClob
public void setNClob(String parameterName, NClob value) throws SQLException
- 指定者:
setNClob在接口中CallableStatement- 抛出:
SQLException
-
setNClob
public void setNClob(String parameterName, Reader reader) throws SQLException
- 指定者:
setNClob在接口中CallableStatement- 抛出:
SQLException
-
setNClob
public void setNClob(String parameterName, Reader reader, long length) throws SQLException
- 指定者:
setNClob在接口中CallableStatement- 抛出:
SQLException
-
setSQLXML
public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException
- 指定者:
setSQLXML在接口中CallableStatement- 抛出:
SQLException
-
getSQLXML
public SQLXML getSQLXML(int parameterIndex) throws SQLException
- 指定者:
getSQLXML在接口中CallableStatement- 抛出:
SQLException
-
getSQLXML
public SQLXML getSQLXML(String parameterName) throws SQLException
- 指定者:
getSQLXML在接口中CallableStatement- 抛出:
SQLException
-
getNString
public String getNString(int parameterIndex) throws SQLException
- 指定者:
getNString在接口中CallableStatement- 抛出:
SQLException
-
getNString
public String getNString(String parameterName) throws SQLException
- 指定者:
getNString在接口中CallableStatement- 抛出:
SQLException
-
getNCharacterStream
public Reader getNCharacterStream(int parameterIndex) throws SQLException
- 指定者:
getNCharacterStream在接口中CallableStatement- 抛出:
SQLException
-
getNCharacterStream
public Reader getNCharacterStream(String parameterName) throws SQLException
- 指定者:
getNCharacterStream在接口中CallableStatement- 抛出:
SQLException
-
getCharacterStream
public Reader getCharacterStream(int parameterIndex) throws SQLException
- 指定者:
getCharacterStream在接口中CallableStatement- 抛出:
SQLException
-
getCharacterStream
public Reader getCharacterStream(String parameterName) throws SQLException
- 指定者:
getCharacterStream在接口中CallableStatement- 抛出:
SQLException
-
getNClob
public NClob getNClob(int parameterIndex) throws SQLException
- 指定者:
getNClob在接口中CallableStatement- 抛出:
SQLException
-
getNClob
public NClob getNClob(String parameterName) throws SQLException
- 指定者:
getNClob在接口中CallableStatement- 抛出:
SQLException
-
s2b
protected byte[] s2b(String s)
Converts the given string to bytes, using the connection's character encoding.- 参数:
s- string- 返回:
- bytes
-
executeLargeUpdate
public long executeLargeUpdate() throws SQLException- 指定者:
executeLargeUpdate在接口中PreparedStatement- 覆盖:
executeLargeUpdate在类中ClientPreparedStatement- 抛出:
SQLException
-
executeLargeBatch
public long[] executeLargeBatch() throws SQLException- 指定者:
executeLargeBatch在接口中Statement- 覆盖:
executeLargeBatch在类中StatementImpl- 抛出:
SQLException
-
-