Class JDBC4ServerPreparedStatement
java.lang.Object
com.mysql.jdbc.StatementImpl
com.mysql.jdbc.PreparedStatement
com.mysql.jdbc.ServerPreparedStatement
com.mysql.jdbc.JDBC4ServerPreparedStatement
- All Implemented Interfaces:
Statement, Wrapper, AutoCloseable, PreparedStatement, Statement, Wrapper
- Direct Known Subclasses:
JDBC42ServerPreparedStatement
-
Nested Class Summary
Nested classes/interfaces inherited from class ServerPreparedStatement
ServerPreparedStatement.BatchedBindValues, ServerPreparedStatement.BindValueNested classes/interfaces inherited from class PreparedStatement
PreparedStatement.AppendingBatchVisitor, PreparedStatement.BatchParams, PreparedStatement.BatchVisitor, PreparedStatement.EmulatedPreparedStatementBindings, PreparedStatement.EndPoint, PreparedStatement.ParseInfoNested classes/interfaces inherited from class StatementImpl
StatementImpl.CancelTask -
Field Summary
Fields inherited from class ServerPreparedStatement
BLOB_STREAM_READ_BUF_SIZE, isCachedFields inherited from class PreparedStatement
batchCommandIndex, batchedValuesClause, batchHasPlainStatements, firstCharOfStmt, isLoadDataQuery, isNull, numberOfExecutions, originalSql, parameterCount, parameterMetaData, parameterTypes, parseInfo, rewrittenBatchSize, serverSupportsFracSecs, useTrueBoolean, usingAnsiModeFields inherited from class StatementImpl
batchedArgs, batchedGeneratedKeys, cancelTimeoutMutex, charConverter, charEncoding, clearWarningsCalled, connection, continueBatchOnError, currentCatalog, doEscapeProcessing, generatedKeysResults, holdResultsOpenOverClose, isClosed, lastInsertId, lastQueryIsOnDupKeyUpdate, maxFieldSize, maxRows, ON_DUPLICATE_KEY_UPDATE_CLAUSE, openResults, pedantic, physicalConnection, PING_MARKER, pingTarget, profileSQL, results, resultSetConcurrency, resultSetType, retrieveGeneratedKeys, sendFractionalSeconds, statementCounter, statementExecuting, statementId, timeoutInMillis, updateCount, useLegacyDatetimeCode, USES_VARIABLES_FALSE, USES_VARIABLES_TRUE, USES_VARIABLES_UNKNOWN, useUsageAdvisor, version5013OrNewer, warningChain, wasCancelled, wasCancelledByTimeoutFields inherited from interface Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO -
Constructor Summary
ConstructorsConstructorDescriptionJDBC4ServerPreparedStatement(MySQLConnection conn, String sql, String catalog, int resultSetType, int resultSetConcurrency) -
Method Summary
Modifier and TypeMethodDescriptionvoidsetNCharacterStream(int parameterIndex, Reader reader, long length) JDBC 2.0 When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader.voidJDBC 4.0 Set a NCLOB parameter.voidvoidsetNString(int parameterIndex, String x) Set a parameter to a Java String value.voidvoidMethods inherited from class ServerPreparedStatement
addBatch, asSql, canRewriteAsMultiValueInsertAtSqlLevel, checkClosed, clearParameters, close, computeMaxParameterSetSizeAndBatchSize, containsOnDuplicateKeyUpdateInSQL, executeBatchSerially, executeInternal, fillSendPacket, fillSendPacket, getBinding, getBytes, getInstance, getLocationOfOnDuplicateKeyUpdate, getMetaData, getParameterBindValues, getParameterMetaData, getServerStatementId, isCursorRequired, isNull, isOnDuplicateKeyUpdate, prepareBatchedInsertSQL, realClose, rePrepare, resetToType, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setClosed, setDate, setDate, setDouble, setFloat, setInt, setLong, setNull, setNull, setOneBatchedParameterSet, setPoolable, setRef, setShort, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURL, toStringMethods inherited from class PreparedStatement
addBatch, asSql, canRewrite, checkBounds, checkReadOnlySafeStatement, clearBatch, computeBatchSize, detectFractionalSecondsSupport, execute, executeBatchedInserts, executeBatchInternal, executeLargeUpdate, executePreparedBatchAsMultiStatement, executeQuery, executeUpdate, executeUpdateInternal, executeUpdateInternal, getBytesRepresentation, getBytesRepresentationForBatch, getDateTime, getInstance, getInstance, getInstance, getNonRewrittenSql, getParameterBindings, getParameterIndexOffset, getParseInfo, getPreparedSql, getRewrittenBatchSize, getUpdateCount, getValuesClause, isSelectQuery, readFully, setAsciiStream, setAsciiStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBytes, setBytesNoEscape, setBytesNoEscapeNoQuotes, setCharacterStream, setCharacterStream, setClob, setClob, setInternal, setInternal, setNCharacterStream, setNClob, setObject, setObject, setObject, setRetrieveGeneratedKeys, setTimestampInternalMethods inherited from class StatementImpl
cancel, checkForDml, checkNullOrEmptyQuery, clearWarnings, closeAllOpenResults, closeOnCompletion, containsOnDuplicateKeyInString, createStreamingResultSet, disableStreamingResults, doPingInstead, enableStreamingResults, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeSimpleNonQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, executeUpdateInternal, findStartOfStatement, generatePingResultSet, getBatchedArgs, getBatchedGeneratedKeys, getBatchedGeneratedKeys, getCalendarInstanceForSessionOrNew, getConnection, getExceptionInterceptor, getFetchDirection, getFetchSize, getGeneratedKeys, getGeneratedKeysInternal, getGeneratedKeysInternal, getId, getLargeMaxRows, getLargeUpdateCount, getLastInsertID, getLocalInfileInputStream, getLongUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getOnDuplicateKeyLocation, getOpenResultSetCount, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetInternal, getResultSetType, getWarnings, handleExceptionForBatch, hasDeadlockOrTimeoutRolledBackTx, implicitlyCloseAllOpenResults, isClosed, isCloseOnCompletion, isPoolable, isWrapperFor, processMultiCountsAndKeys, removeOpenResultSet, resetCancelledState, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setHoldResultsOpenOverClose, setLargeMaxRows, setLocalInfileInputStream, setMaxFieldSize, setMaxRows, setPingTarget, setQueryTimeout, setResultSetConcurrency, setResultSetType, setupStreamingTimeout, statementBegins, unwrapMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface PreparedStatement
setObject, setObjectMethods inherited from interface Statement
cancel, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, 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, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setQueryTimeoutMethods inherited from interface Wrapper
isWrapperFor, unwrap
-
Constructor Details
-
JDBC4ServerPreparedStatement
public JDBC4ServerPreparedStatement(MySQLConnection conn, String sql, String catalog, int resultSetType, int resultSetConcurrency) throws SQLException - Throws:
SQLException
-
-
Method Details
-
setNCharacterStream
Description copied from class:PreparedStatementJDBC 2.0 When a very large UNICODE value is input to a LONGVARCHAR parameter, it may be more practical to send it via a java.io.Reader. JDBC will read the data from the stream as needed, until it reaches end-of-file. The JDBC driver will do any necessary conversion from UNICODE to the database char format.Note: This stream object can either be a standard Java stream object or your own subclass that implements the standard interface.
- Specified by:
setNCharacterStreamin interfacePreparedStatement- Overrides:
setNCharacterStreamin classPreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...reader- the java reader which contains the UNICODE datalength- the number of characters in the stream- Throws:
SQLException- if a database-access error occurs.- See Also:
-
setNClob
- Throws:
SQLException- See Also:
-
setNClob
JDBC 4.0 Set a NCLOB parameter.- Specified by:
setNClobin interfacePreparedStatement- Overrides:
setNClobin classPreparedStatement- Parameters:
parameterIndex- the first parameter is 1, the second is 2, ...reader- the java reader which contains the UNICODE datalength- the number of characters in the stream- Throws:
SQLException- if a database error occurs
-
setNString
Description copied from class:PreparedStatementSet a parameter to a Java String value. The driver converts this to a SQL VARCHAR or LONGVARCHAR value with introducer _utf8 (depending on the arguments size relative to the driver's limits on VARCHARs) when it sends it to the database. If charset is set as utf8, this method just call setString.- Specified by:
setNStringin interfacePreparedStatement- Overrides:
setNStringin classPreparedStatement- Parameters:
parameterIndex- the first parameter is 1...x- the parameter value- Throws:
SQLException- if a database access error occurs- See Also:
-
setRowId
- Throws:
SQLException
-
setSQLXML
- Throws:
SQLException
-