Package com.google.cloud.spanner.connection (6.89.0)

Repository

This package is not the recommended entry point to using this client library!

For this library, we recommend using com.google.cloud.spanner for new applications.

Classes

ClassDescription
com.google.cloud.spanner.connection.AbstractStatementParserInternal class for the Spanner Connection API.

Parses ClientSideStatements and normal SQL statements. The parser is able to recognize the type of statement, allowing the connection API to know which method on Spanner should be

com.google.cloud.spanner.connection.AbstractStatementParser.ParametersInfoParameter information with positional parameters translated to named parameters.
com.google.cloud.spanner.connection.AbstractStatementParser.ParsedStatementA statement that has been parsed
com.google.cloud.spanner.connection.Connection.InternalMetadataQueryThis query option is used internally to indicate that a query is executed by the library itself to fetch metadata. These queries are specifically allowed to be executed even when a DDL batch is active.
com.google.cloud.spanner.connection.ConnectionOptionsInternal connection API for Google Cloud Spanner. This class may introduce breaking changes without prior notice.

Options for creating a Connection to a Google Cloud Spanner database.

com.google.cloud.spanner.connection.ConnectionOptions.BuilderBuilder for ConnectionOptions instances.
com.google.cloud.spanner.connection.ConnectionPropertiesUtility class that defines all known connection properties.
com.google.cloud.spanner.connection.ConnectionPropertyConnectionProperty is a variable for a connection. The total set of connection properties is the state of a connection, and determine the behavior of that connection. For example, a connection with a ConnectionProperty READONLY=true and AUTOCOMMIT=false will use read-only transactions by default, while a connection with READONLY=false and AUTOCOMMIT=false
com.google.cloud.spanner.connection.DirectedReadOptionsUtil
com.google.cloud.spanner.connection.PartitionIdContains a reference to a BatchTransactionId and a Partition. The combination of these two are needed to execute a partition of a partitioned query on a Connection. A PartitionId can safely be given to a different connection and/or host to be executed there.
com.google.cloud.spanner.connection.PostgreSQLStatementParser
com.google.cloud.spanner.connection.ReadOnlyStalenessUtilUtil class for parsing and converting ReadOnlyStaleness values to/from strings. This util is used to parse client side statements and values for read only staleness for read-only transactions on Cloud Spanner.
com.google.cloud.spanner.connection.SpannerPoolPool for keeping track of Spanner instances needed for connections.

When a connection is opened for a Google Cloud Spanner database, a Spanner object can be opened in the background. The SpannerPool keeps track of which Spanner objects

com.google.cloud.spanner.connection.SpannerStatementParser
com.google.cloud.spanner.connection.TransactionRetryListenerImplDefault (no-op) implementation for TransactionRetryListener.

Interfaces

InterfaceDescription
com.google.cloud.spanner.connection.AsyncStatementResult
com.google.cloud.spanner.connection.ConnectionInternal connection API for Google Cloud Spanner. This interface may introduce breaking changes without prior notice.

A connection to a Cloud Spanner database. Connections are not designed to be thread-safe. The

com.google.cloud.spanner.connection.Connection.TransactionCallableFunctional interface for the #runTransaction(TransactionCallable) method.
com.google.cloud.spanner.connection.ConnectionOptions.ExternalChannelProviderExternalChannelProvider can be used for to specify an external channel provider. This is needed if you require different certificates than those provided by the standard grpc channel provider.
com.google.cloud.spanner.connection.PartitionedQueryResultSetResult set that is returned for partitioned queries.
com.google.cloud.spanner.connection.StatementResultA result of the execution of a statement. Statements that are executed by the Connection#execute(com.google.cloud.spanner.Statement) method could have different types of return values. These are wrapped in a StatementResult.
com.google.cloud.spanner.connection.TransactionRetryListenerCloud Spanner can abort any read/write transaction because of potential deadlocks or other internal reasons. When a transaction is aborted, the entire transaction should be retried. A Connection can automatically retry a transaction internally and check whether the results that are returned during a retry attempt are equal to the results during the original

Enums

EnumDescription
com.google.cloud.spanner.connection.AbstractStatementParser.StatementTypeThe type of statement that has been recognized by the parser.
com.google.cloud.spanner.connection.AutocommitDmlModeEnum used to define the behavior of DML statements in autocommit mode
com.google.cloud.spanner.connection.ConnectionProperty.ContextContext indicates when a ConnectionProperty may be set. Each higher-ordinal value includes the preceding values, meaning that a ConnectionProperty with Context#USER can be set both at connection startup and during the connection's lifetime.
com.google.cloud.spanner.connection.DdlInTransactionModeEnum used for setting the behavior of DDL in read/write transactions.
com.google.cloud.spanner.connection.SavepointSupportOption value used for determining the behavior of savepoints.
com.google.cloud.spanner.connection.StatementResult.ClientSideStatementTypeThe type of client side statement that was executed.
com.google.cloud.spanner.connection.StatementResult.ResultTypeEnum indicating the type of result that was returned by Connection#execute(com.google.cloud.spanner.Statement)
com.google.cloud.spanner.connection.TransactionModeEnum used to define the transaction type of a Connection
com.google.cloud.spanner.connection.TransactionRetryListener.RetryResultThe result of a retry.