Package | Description |
---|---|
com.google.cloud.spanner |
A client for Cloud Spanner - A no-compromise relational database service.
|
com.google.cloud.spanner.jdbc | |
com.google.cloud.spanner.spi.v1 | |
com.google.cloud.spanner.testing |
Modifier and Type | Class and Description |
---|---|
class |
AbortedDueToConcurrentModificationException
Exception thrown by a
CloudSpannerJdbcConnection when a database operation detects that a
transaction has aborted and an internal retry failed because of a concurrent modification. |
class |
AbortedException
Exception thrown by Cloud Spanner when an operation detects that a transaction has aborted.
|
class |
SessionNotFoundException
Exception thrown by Cloud Spanner when an operation detects that the session that is being used
is no longer valid.
|
class |
SpannerBatchUpdateException |
Modifier and Type | Method and Description |
---|---|
SpannerException |
AbortedDueToConcurrentModificationException.getDatabaseErrorDuringRetry() |
static SpannerException |
SpannerExceptionFactory.newSpannerException(Context context,
Throwable cause)
Creates a new exception based on
cause . |
static SpannerException |
SpannerExceptionFactory.newSpannerException(ErrorCode code,
String message) |
static SpannerException |
SpannerExceptionFactory.newSpannerException(ErrorCode code,
String message,
Throwable cause) |
static SpannerException |
SpannerExceptionFactory.newSpannerException(Throwable cause)
Creates a new exception based on
cause . |
static SpannerException |
SpannerExceptionFactory.propagateInterrupt(InterruptedException e) |
static SpannerException |
SpannerExceptionFactory.propagateTimeout(TimeoutException e)
Transforms a
TimeoutException to a SpannerException . |
Modifier and Type | Method and Description |
---|---|
static AbortedDueToConcurrentModificationException |
SpannerExceptionFactory.newAbortedDueToConcurrentModificationException(AbortedException cause,
SpannerException databaseError)
Constructs a specific aborted exception that should only be thrown by a connection after an
internal retry aborted because a database call caused an exception that did not happen during
the original attempt.
|
Modifier and Type | Method and Description |
---|---|
com.google.api.gax.longrunning.OperationFuture<Database,CreateDatabaseMetadata> |
Instance.createDatabase(String databaseId,
Iterable<String> statements)
Creates a new database in this instance.
|
com.google.api.gax.longrunning.OperationFuture<Database,CreateDatabaseMetadata> |
DatabaseAdminClient.createDatabase(String instanceId,
String databaseId,
Iterable<String> statements)
Creates a new database in a Cloud Spanner instance.
|
com.google.api.gax.longrunning.OperationFuture<Instance,CreateInstanceMetadata> |
InstanceAdminClient.createInstance(InstanceInfo instance)
Creates an instance and begins preparing it to begin serving.
|
void |
InstanceAdminClient.deleteInstance(String instanceId)
Deletes an instance.
|
void |
Database.drop()
Drops this database.
|
void |
DatabaseAdminClient.dropDatabase(String instanceId,
String databaseId)
Drops a Cloud Spanner database.
|
ResultSet |
BatchReadOnlyTransaction.execute(Partition partition)
Execute the partition to return
ResultSet . |
Database |
DatabaseAdminClient.getDatabase(String instanceId,
String databaseId)
Gets the current state of a Cloud Spanner database.
|
Iterable<String> |
Database.getDdl()
Returns the schema of a Cloud Spanner database as a list of formatted DDL statements.
|
Instance |
InstanceAdminClient.getInstance(String instanceId)
Gets an instance.
|
InstanceConfig |
InstanceAdminClient.getInstanceConfig(String configId)
Gets an instance config.
|
R |
Operation.getResult()
Returns result of the operation if the operation is complete and had a result.
|
com.google.api.gax.paging.Page<InstanceConfig> |
InstanceAdminClient.listInstanceConfigs(Options.ListOption... options)
Lists the supported instance configs for current project.
|
com.google.api.gax.paging.Page<Instance> |
InstanceAdminClient.listInstances(Options.ListOption... options)
Lists the instances.
|
boolean |
ForwardingResultSet.next() |
boolean |
ResultSet.next()
Advances the result set to the next row, returning false if no such row exists.
|
List<Partition> |
BatchReadOnlyTransaction.partitionQuery(PartitionOptions partitionOptions,
Statement statement,
Options.QueryOption... options)
Returns a list of
Partition to execute a query against the database. |
List<Partition> |
BatchReadOnlyTransaction.partitionRead(PartitionOptions partitionOptions,
String table,
KeySet keys,
Iterable<String> columns,
Options.ReadOption... options)
Returns a list of
Partition to read zero or more rows from a database. |
List<Partition> |
BatchReadOnlyTransaction.partitionReadUsingIndex(PartitionOptions partitionOptions,
String table,
String index,
KeySet keys,
Iterable<String> columns,
Options.ReadOption... options)
Returns a list of
Partition to read zero or more rows from a database using an index. |
Database |
Database.reload()
Fetches the database's current information.
|
Operation<R,M> |
Operation.reload()
Fetches the current status of this operation.
|
com.google.api.gax.longrunning.OperationFuture<Void,UpdateDatabaseDdlMetadata> |
DatabaseAdminClient.updateDatabaseDdl(String instanceId,
String databaseId,
Iterable<String> statements,
String operationId)
Enqueues the given DDL statements to be applied, in order but not necessarily all at once, to
the database schema at some point (or points) in the future.
|
com.google.api.gax.longrunning.OperationFuture<Void,UpdateDatabaseDdlMetadata> |
Database.updateDdl(Iterable<String> statements,
String operationId)
Enqueues the given DDL statements to be applied, in order but not necessarily all at once, to
the database schema at some point (or points) in the future.
|
Operation<R,M> |
Operation.waitFor(com.google.cloud.RetryOption... waitOptions)
Blocks till the operation is complete or maximum time, if specified, has elapsed.
|
com.google.cloud.Timestamp |
DatabaseClient.write(Iterable<Mutation> mutations)
Writes the given mutations atomically to the database.
|
com.google.cloud.Timestamp |
DatabaseClient.writeAtLeastOnce(Iterable<Mutation> mutations)
Writes the given mutations atomically to the database without replay protection.
|
Modifier and Type | Method and Description |
---|---|
SpannerException |
JdbcSqlExceptionFactory.JdbcAbortedDueToConcurrentModificationException.getDatabaseErrorDuringRetry() |
Modifier and Type | Method and Description |
---|---|
void |
SpannerRpc.ResultStreamConsumer.onError(SpannerException e) |
Modifier and Type | Method and Description |
---|---|
List<Session> |
GapicSpannerRpc.batchCreateSessions(String databaseName,
int sessionCount,
Map<String,String> labels,
Map<SpannerRpc.Option,?> options) |
List<Session> |
SpannerRpc.batchCreateSessions(String databaseName,
int sessionCount,
Map<String,String> labels,
Map<SpannerRpc.Option,?> options) |
Transaction |
GapicSpannerRpc.beginTransaction(BeginTransactionRequest request,
Map<SpannerRpc.Option,?> options) |
Transaction |
SpannerRpc.beginTransaction(BeginTransactionRequest request,
Map<SpannerRpc.Option,?> options) |
CommitResponse |
GapicSpannerRpc.commit(CommitRequest commitRequest,
Map<SpannerRpc.Option,?> options) |
CommitResponse |
SpannerRpc.commit(CommitRequest commitRequest,
Map<SpannerRpc.Option,?> options) |
com.google.api.gax.longrunning.OperationFuture<Database,CreateDatabaseMetadata> |
GapicSpannerRpc.createDatabase(String instanceName,
String createDatabaseStatement,
Iterable<String> additionalStatements) |
com.google.api.gax.longrunning.OperationFuture<Database,CreateDatabaseMetadata> |
SpannerRpc.createDatabase(String instanceName,
String createDatabaseStatement,
Iterable<String> additionalStatements) |
com.google.api.gax.longrunning.OperationFuture<Instance,CreateInstanceMetadata> |
GapicSpannerRpc.createInstance(String parent,
String instanceId,
Instance instance) |
com.google.api.gax.longrunning.OperationFuture<Instance,CreateInstanceMetadata> |
SpannerRpc.createInstance(String parent,
String instanceId,
Instance instance) |
Session |
GapicSpannerRpc.createSession(String databaseName,
Map<String,String> labels,
Map<SpannerRpc.Option,?> options) |
Session |
SpannerRpc.createSession(String databaseName,
Map<String,String> labels,
Map<SpannerRpc.Option,?> options) |
void |
GapicSpannerRpc.deleteInstance(String instanceName) |
void |
SpannerRpc.deleteInstance(String instanceName) |
void |
GapicSpannerRpc.deleteSession(String sessionName,
Map<SpannerRpc.Option,?> options) |
void |
SpannerRpc.deleteSession(String sessionName,
Map<SpannerRpc.Option,?> options) |
void |
GapicSpannerRpc.dropDatabase(String databaseName) |
void |
SpannerRpc.dropDatabase(String databaseName) |
Database |
GapicSpannerRpc.getDatabase(String databaseName) |
Database |
SpannerRpc.getDatabase(String databaseName) |
List<String> |
GapicSpannerRpc.getDatabaseDdl(String databaseName) |
List<String> |
SpannerRpc.getDatabaseDdl(String databaseName) |
Instance |
GapicSpannerRpc.getInstance(String instanceName) |
Instance |
SpannerRpc.getInstance(String instanceName) |
InstanceConfig |
GapicSpannerRpc.getInstanceConfig(String instanceConfigName) |
InstanceConfig |
SpannerRpc.getInstanceConfig(String instanceConfigName) |
com.google.longrunning.Operation |
GapicSpannerRpc.getOperation(String name) |
com.google.longrunning.Operation |
SpannerRpc.getOperation(String name)
Retrieves a long running operation.
|
SpannerRpc.Paginated<Database> |
GapicSpannerRpc.listDatabases(String instanceName,
int pageSize,
String pageToken) |
SpannerRpc.Paginated<Database> |
SpannerRpc.listDatabases(String instanceName,
int pageSize,
String pageToken) |
SpannerRpc.Paginated<InstanceConfig> |
GapicSpannerRpc.listInstanceConfigs(int pageSize,
String pageToken) |
SpannerRpc.Paginated<InstanceConfig> |
SpannerRpc.listInstanceConfigs(int pageSize,
String pageToken) |
SpannerRpc.Paginated<Instance> |
GapicSpannerRpc.listInstances(int pageSize,
String pageToken,
String filter) |
SpannerRpc.Paginated<Instance> |
SpannerRpc.listInstances(int pageSize,
String pageToken,
String filter) |
PartitionResponse |
GapicSpannerRpc.partitionQuery(PartitionQueryRequest request,
Map<SpannerRpc.Option,?> options) |
PartitionResponse |
SpannerRpc.partitionQuery(PartitionQueryRequest request,
Map<SpannerRpc.Option,?> options) |
PartitionResponse |
GapicSpannerRpc.partitionRead(PartitionReadRequest request,
Map<SpannerRpc.Option,?> options) |
PartitionResponse |
SpannerRpc.partitionRead(PartitionReadRequest request,
Map<SpannerRpc.Option,?> options) |
void |
GapicSpannerRpc.rollback(RollbackRequest request,
Map<SpannerRpc.Option,?> options) |
void |
SpannerRpc.rollback(RollbackRequest request,
Map<SpannerRpc.Option,?> options) |
com.google.api.gax.longrunning.OperationFuture<Empty,UpdateDatabaseDdlMetadata> |
GapicSpannerRpc.updateDatabaseDdl(String databaseName,
Iterable<String> updateDatabaseStatements,
String updateId) |
com.google.api.gax.longrunning.OperationFuture<Empty,UpdateDatabaseDdlMetadata> |
SpannerRpc.updateDatabaseDdl(String databaseName,
Iterable<String> updateDatabaseStatements,
String updateId) |
com.google.api.gax.longrunning.OperationFuture<Instance,UpdateInstanceMetadata> |
GapicSpannerRpc.updateInstance(Instance instance,
FieldMask fieldMask) |
com.google.api.gax.longrunning.OperationFuture<Instance,UpdateInstanceMetadata> |
SpannerRpc.updateInstance(Instance instance,
FieldMask fieldMask) |
Modifier and Type | Method and Description |
---|---|
Database |
RemoteSpannerHelper.createTestDatabase(Iterable<String> statements)
Creates a test database defined by
statements in the test instance. |
Database |
RemoteSpannerHelper.createTestDatabase(String... statements)
Creates a test database defined by
statements . |
Copyright © 2019 Google LLC. All rights reserved.