Uses of Class
com.google.cloud.spanner.Statement
Package
Description
A client for Cloud Spanner - A no-compromise relational database service.
Internal API for Google Cloud Spanner.
-
Uses of Statement in com.google.cloud.spanner
Modifier and TypeMethodDescriptionStatement.Builder.build()
Builds theStatement
.static Statement
Creates aStatement
with the given SQL textsql
.Modifier and TypeMethodDescriptionReadContext.analyzeQuery
(Statement statement, ReadContext.QueryAnalyzeMode queryMode) Analyzes a query and returns query plan and/or query execution statistics information.default ResultSetStats
TransactionContext.analyzeUpdate
(Statement statement, ReadContext.QueryAnalyzeMode analyzeMode, Options.UpdateOption... options) Deprecated.default ResultSet
TransactionContext.analyzeUpdateStatement
(Statement statement, ReadContext.QueryAnalyzeMode analyzeMode, Options.UpdateOption... options) Analyzes a DML statement and returns query plan and statement parameter metadata and optionally execution statistics information.long
DatabaseClient.executePartitionedUpdate
(Statement stmt, Options.UpdateOption... options) Returns the lower bound of rows modified by this DML statement.ReadContext.executeQuery
(Statement statement, Options.QueryOption... options) Executes a query against the database.ReadContext.executeQueryAsync
(Statement statement, Options.QueryOption... options) Same asReadContext.executeQuery(Statement, QueryOption...)
, but is guaranteed to be non-blocking and returns its results as anAsyncResultSet
.long
TransactionContext.executeUpdate
(Statement statement, Options.UpdateOption... options) Executes the DML statement (which can be a simple DML statement or DML statement with a returning clause) and returns the number of rows modified.com.google.api.core.ApiFuture<Long>
TransactionContext.executeUpdateAsync
(Statement statement, Options.UpdateOption... options) Same asTransactionContext.executeUpdate(Statement,UpdateOption...)
, but is guaranteed to be non-blocking.BatchReadOnlyTransaction.partitionQuery
(PartitionOptions partitionOptions, Statement statement, Options.QueryOption... options) Returns a list ofPartition
to execute a query against the database.Modifier and TypeMethodDescriptionlong[]
TransactionContext.batchUpdate
(Iterable<Statement> statements, Options.UpdateOption... options) Executes a list of DML statements (which can include simple DML statements or DML statements with returning clause) in a single request.com.google.api.core.ApiFuture<long[]>
TransactionContext.batchUpdateAsync
(Iterable<Statement> statements, Options.UpdateOption... options) Same asTransactionContext.batchUpdate(Iterable, UpdateOption...)
, but is guaranteed to be non-blocking. -
Uses of Statement in com.google.cloud.spanner.connection
Modifier and TypeMethodDescriptionConnection.analyzeQuery
(Statement query, ReadContext.QueryAnalyzeMode queryMode) Analyzes a query or a DML statement and returns query plan and/or query execution statistics information.default ResultSetStats
Connection.analyzeUpdate
(Statement update, ReadContext.QueryAnalyzeMode analyzeMode) Deprecated.default ResultSet
Connection.analyzeUpdateStatement
(Statement statement, ReadContext.QueryAnalyzeMode analyzeMode, Options.UpdateOption... options) Analyzes a DML statement and returns execution plan, undeclared parameters and optionally execution statistics information.Executes the given statement if allowed in the currentTransactionMode
and connection state.Connection.executeAsync
(Statement statement) Executes the given statement if allowed in the currentTransactionMode
and connection state asynchronously.Connection.executeQuery
(Statement query, Options.QueryOption... options) Executes the given statement (a query or a DML statement with returning clause) and returns the result as aResultSet
.Connection.executeQueryAsync
(Statement query, Options.QueryOption... options) Executes the given statement (a query or a DML statement with returning clause) asynchronously and returns the result as anAsyncResultSet
.long
Connection.executeUpdate
(Statement update) Executes the given statement as a simple DML statement.com.google.api.core.ApiFuture<Long>
Connection.executeUpdateAsync
(Statement update) Executes the given statement asynchronously as a simple DML statement.Parses the given statement and categorizes it as one of the possibleAbstractStatementParser.StatementType
s.Connection.partitionQuery
(Statement query, PartitionOptions partitionOptions, Options.QueryOption... options) Partitions the given query, so it can be executed in parallel.Connection.runPartitionedQuery
(Statement query, PartitionOptions partitionOptions, Options.QueryOption... options) Executes the given query as a partitioned query.Modifier and TypeMethodDescriptionlong[]
Connection.executeBatchUpdate
(Iterable<Statement> updates) Executes a list of DML statements (can be simple DML statements or DML statements with returning clause) in a single request.com.google.api.core.ApiFuture<long[]>
Connection.executeBatchUpdateAsync
(Iterable<Statement> updates) Executes a list of DML statements (can be simple DML statements or DML statements with returning clause) in a single request.
TransactionContext.analyzeUpdateStatement(Statement, QueryAnalyzeMode, UpdateOption...)
instead to get both statement plan and parameter metadata