Uses of Class
com.google.cloud.spanner.Statement
Packages that use 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
Methods in com.google.cloud.spanner that return StatementModifier and TypeMethodDescriptionStatement.Builder.build()Builds theStatement.static StatementCreates aStatementwith the given SQL textsql.Statement.withReplacedSql(String sql) Returns a copy of this statement with the SQL string replaced by the given SQL string.Methods in com.google.cloud.spanner with parameters of type StatementModifier and TypeMethodDescriptionReadContext.analyzeQuery(Statement statement, ReadContext.QueryAnalyzeMode queryMode) Analyzes a query and returns query plan and/or query execution statistics information.default ResultSetStatsTransactionContext.analyzeUpdate(Statement statement, ReadContext.QueryAnalyzeMode analyzeMode, Options.UpdateOption... options) Deprecated.default ResultSetTransactionContext.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.longDatabaseClient.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.longTransactionContext.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 ofPartitionto execute a query against the database.Method parameters in com.google.cloud.spanner with type arguments of type StatementModifier and TypeMethodDescriptionlong[]TransactionContext.batchUpdate(Iterable<Statement> statements, Options.UpdateOption... options) Executes a list of DML statements 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
Methods in com.google.cloud.spanner.connection with parameters of type StatementModifier 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 ResultSetStatsConnection.analyzeUpdate(Statement update, ReadContext.QueryAnalyzeMode analyzeMode) Deprecated.default ResultSetConnection.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 currentTransactionModeand connection state.default StatementResultConnection.execute(Statement statement, Set<StatementResult.ResultType> allowedResultTypes) Executes the given statement if allowed in the currentTransactionModeand connection state, and if the result that would be returned is in the set of allowed result types.Connection.executeAsync(Statement statement) Executes the given statement if allowed in the currentTransactionModeand 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.longConnection.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.StatementTypes.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.Method parameters in com.google.cloud.spanner.connection with type arguments of type StatementModifier 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