public class CloudSpannerPreparedStatement extends AbstractCloudSpannerPreparedStatement
CloudSpannerStatement.CustomDriverStatementlastResultSet, lastUpdateCountCLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO| Constructor and Description |
|---|
CloudSpannerPreparedStatement(String sql,
CloudSpannerConnection connection,
com.google.cloud.spanner.DatabaseClient dbClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatch() |
void |
cancel() |
protected void |
checkClosed() |
void |
clearBatch() |
void |
clearWarnings() |
void |
close() |
void |
closeOnCompletion() |
protected String |
createInsertSelectOnDuplicateKeyUpdateStatement(net.sf.jsqlparser.statement.update.Update update)
Transform the given UPDATE-statement into an "INSERT INTO TAB1 (...)
SELECT ...
|
protected void |
determineForceSingleUseReadContext(net.sf.jsqlparser.statement.select.Select select)
Determines whether the given sql statement must be executed in a single
use read context.
|
boolean |
execute() |
int[] |
executeBatch() |
ResultSet |
executeQuery() |
ResultSet |
executeQuery(String sql) |
int |
executeUpdate() |
CloudSpannerConnection |
getConnection() |
ResultSet |
getGeneratedKeys() |
int |
getMaxFieldSize() |
int |
getMaxRows() |
CloudSpannerParameterMetaData |
getParameterMetaData() |
int |
getQueryTimeout() |
protected com.google.cloud.spanner.ReadContext |
getReadContext() |
int |
getResultSetConcurrency() |
int |
getResultSetHoldability() |
int |
getResultSetType() |
SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isCloseOnCompletion() |
boolean |
isForceSingleUseReadContext() |
boolean |
isPoolable() |
protected String |
quoteIdentifier(String identifier) |
protected String |
sanitizeSQL(String sql) |
void |
setCursorName(String name) |
void |
setEscapeProcessing(boolean enable) |
void |
setForceSingleUseReadContext(boolean forceSingleUseReadContext) |
void |
setMaxFieldSize(int max) |
void |
setMaxRows(int max) |
void |
setPoolable(boolean poolable) |
void |
setQueryTimeout(int seconds) |
protected String |
unquoteIdentifier(String identifier) |
protected long |
writeMutations(nl.topicus.jdbc.statement.Mutations mutations) |
clearParameters, getMetaData, getParameterStore, 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, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURLaddBatch, execute, execute, execute, execute, executeDDL, executeDDL, executeUpdate, executeUpdate, executeUpdate, executeUpdate, formatDDLStatement, getBatch, getCurrentBatchMode, getCustomDriverStatement, getMoreResults, getMoreResults, getResultSet, getTokens, getTokens, getUpdateCount, isDDLStatement, isSelectStatement, removeCommentsgetFetchDirection, getFetchSize, setFetchDirection, setFetchSizeextractColumnType, getClassName, getGoogleTypeName, isWrapperFor, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteLargeUpdate, setObject, setObjectaddBatch, cancel, clearWarnings, close, closeOnCompletion, execute, execute, execute, execute, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, 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 CloudSpannerPreparedStatement(String sql, CloudSpannerConnection connection, com.google.cloud.spanner.DatabaseClient dbClient)
public ResultSet executeQuery(String sql) throws SQLException
executeQuery in interface StatementexecuteQuery in class CloudSpannerStatementSQLExceptionpublic ResultSet executeQuery() throws SQLException
SQLExceptionpublic void addBatch()
throws SQLException
SQLExceptionpublic void clearBatch()
throws SQLException
clearBatch in interface StatementclearBatch in class CloudSpannerStatementSQLExceptionpublic int[] executeBatch()
throws SQLException
executeBatch in interface StatementexecuteBatch in class CloudSpannerStatementSQLExceptionpublic int executeUpdate()
throws SQLException
SQLExceptionpublic boolean execute()
throws SQLException
SQLExceptionpublic CloudSpannerParameterMetaData getParameterMetaData() throws SQLException
SQLExceptionprotected String createInsertSelectOnDuplicateKeyUpdateStatement(net.sf.jsqlparser.statement.update.Update update) throws SQLException
update - The UPDATE-statementSQLException - if a database exception occurs while getting the table meta
data or if the statement tries to update the primary key
valueprotected void determineForceSingleUseReadContext(net.sf.jsqlparser.statement.select.Select select)
forceSingleUseReadContext to
true if necessary.select - The sql statement to be examined.public boolean isForceSingleUseReadContext()
public void setForceSingleUseReadContext(boolean forceSingleUseReadContext)
protected com.google.cloud.spanner.ReadContext getReadContext()
throws SQLException
SQLExceptionprotected long writeMutations(nl.topicus.jdbc.statement.Mutations mutations)
throws SQLException
SQLExceptionpublic boolean isClosed()
throws SQLException
isClosed in interface StatementSQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableclose in interface StatementSQLExceptionprotected void checkClosed()
throws SQLException
SQLExceptionpublic int getMaxFieldSize()
throws SQLException
getMaxFieldSize in interface StatementSQLExceptionpublic void setMaxFieldSize(int max)
throws SQLException
setMaxFieldSize in interface StatementSQLExceptionpublic int getMaxRows()
throws SQLException
getMaxRows in interface StatementSQLExceptionpublic void setMaxRows(int max)
throws SQLException
setMaxRows in interface StatementSQLExceptionpublic void setEscapeProcessing(boolean enable)
throws SQLException
setEscapeProcessing in interface StatementSQLExceptionpublic int getQueryTimeout()
throws SQLException
getQueryTimeout in interface StatementSQLExceptionpublic void setQueryTimeout(int seconds)
throws SQLException
setQueryTimeout in interface StatementSQLExceptionpublic void cancel()
throws SQLException
cancel in interface StatementSQLExceptionpublic SQLWarning getWarnings() throws SQLException
getWarnings in interface StatementSQLExceptionpublic void clearWarnings()
throws SQLException
clearWarnings in interface StatementSQLExceptionpublic void setCursorName(String name) throws SQLException
setCursorName in interface StatementSQLExceptionpublic int getResultSetConcurrency()
throws SQLException
getResultSetConcurrency in interface StatementSQLExceptionpublic int getResultSetType()
throws SQLException
getResultSetType in interface StatementSQLExceptionpublic CloudSpannerConnection getConnection() throws SQLException
getConnection in interface StatementSQLExceptionpublic ResultSet getGeneratedKeys() throws SQLException
getGeneratedKeys in interface StatementSQLExceptionpublic int getResultSetHoldability()
throws SQLException
getResultSetHoldability in interface StatementSQLExceptionpublic void setPoolable(boolean poolable)
throws SQLException
setPoolable in interface StatementSQLExceptionpublic boolean isPoolable()
throws SQLException
isPoolable in interface StatementSQLExceptionpublic void closeOnCompletion()
throws SQLException
closeOnCompletion in interface StatementSQLExceptionpublic boolean isCloseOnCompletion()
throws SQLException
isCloseOnCompletion in interface StatementSQLExceptionCopyright © 2018. All rights reserved.