Package | Description |
---|---|
com.google.cloud.spanner |
A client for Cloud Spanner - A no-compromise relational database service.
|
com.google.cloud.spanner.spi.v1 | |
com.google.cloud.spanner.testing |
Modifier and Type | Class and Description |
---|---|
class |
AbortedException
Exception thrown by Cloud Spanner when an operation detects that a transaction has aborted.
|
class |
SpannerBatchUpdateException |
Modifier and Type | Method and Description |
---|---|
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 |
---|---|
OperationFuture<Database,com.google.spanner.admin.database.v1.CreateDatabaseMetadata> |
Instance.createDatabase(String databaseId,
Iterable<String> statements)
Creates a new database in this instance.
|
OperationFuture<Database,com.google.spanner.admin.database.v1.CreateDatabaseMetadata> |
DatabaseAdminClient.createDatabase(String instanceId,
String databaseId,
Iterable<String> statements)
Creates a new database in a Cloud Spanner instance.
|
OperationFuture<Instance,com.google.spanner.admin.instance.v1.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.
|
Page<InstanceConfig> |
InstanceAdminClient.listInstanceConfigs(Options.ListOption... options)
Lists the supported instance configs for current project.
|
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. |
Operation<R,M> |
Operation.reload()
Fetches the current status of this operation.
|
Database |
Database.reload()
Fetches the database's current information.
|
OperationFuture<Void,com.google.spanner.admin.database.v1.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.
|
OperationFuture<Void,com.google.spanner.admin.database.v1.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(RetryOption... waitOptions)
Blocks till the operation is complete or maximum time, if specified, has elapsed.
|
Timestamp |
DatabaseClient.write(Iterable<Mutation> mutations)
Writes the given mutations atomically to the database.
|
Timestamp |
DatabaseClient.writeAtLeastOnce(Iterable<Mutation> mutations)
Writes the given mutations atomically to the database without replay protection.
|
Modifier and Type | Method and Description |
---|---|
void |
SpannerRpc.ResultStreamConsumer.onError(SpannerException e) |
Modifier and Type | Method and Description |
---|---|
com.google.spanner.v1.Transaction |
GapicSpannerRpc.beginTransaction(com.google.spanner.v1.BeginTransactionRequest request,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.Transaction |
SpannerRpc.beginTransaction(com.google.spanner.v1.BeginTransactionRequest request,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.CommitResponse |
GapicSpannerRpc.commit(com.google.spanner.v1.CommitRequest commitRequest,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.CommitResponse |
SpannerRpc.commit(com.google.spanner.v1.CommitRequest commitRequest,
Map<SpannerRpc.Option,?> options) |
OperationFuture<com.google.spanner.admin.database.v1.Database,com.google.spanner.admin.database.v1.CreateDatabaseMetadata> |
GapicSpannerRpc.createDatabase(String instanceName,
String createDatabaseStatement,
Iterable<String> additionalStatements) |
OperationFuture<com.google.spanner.admin.database.v1.Database,com.google.spanner.admin.database.v1.CreateDatabaseMetadata> |
SpannerRpc.createDatabase(String instanceName,
String createDatabaseStatement,
Iterable<String> additionalStatements) |
OperationFuture<com.google.spanner.admin.instance.v1.Instance,com.google.spanner.admin.instance.v1.CreateInstanceMetadata> |
GapicSpannerRpc.createInstance(String parent,
String instanceId,
com.google.spanner.admin.instance.v1.Instance instance) |
OperationFuture<com.google.spanner.admin.instance.v1.Instance,com.google.spanner.admin.instance.v1.CreateInstanceMetadata> |
SpannerRpc.createInstance(String parent,
String instanceId,
com.google.spanner.admin.instance.v1.Instance instance) |
com.google.spanner.v1.Session |
GapicSpannerRpc.createSession(String databaseName,
Map<String,String> labels,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.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) |
com.google.spanner.admin.database.v1.Database |
GapicSpannerRpc.getDatabase(String databaseName) |
com.google.spanner.admin.database.v1.Database |
SpannerRpc.getDatabase(String databaseName) |
List<String> |
GapicSpannerRpc.getDatabaseDdl(String databaseName) |
List<String> |
SpannerRpc.getDatabaseDdl(String databaseName) |
com.google.spanner.admin.instance.v1.Instance |
GapicSpannerRpc.getInstance(String instanceName) |
com.google.spanner.admin.instance.v1.Instance |
SpannerRpc.getInstance(String instanceName) |
com.google.spanner.admin.instance.v1.InstanceConfig |
GapicSpannerRpc.getInstanceConfig(String instanceConfigName) |
com.google.spanner.admin.instance.v1.InstanceConfig |
SpannerRpc.getInstanceConfig(String instanceConfigName) |
Operation |
GapicSpannerRpc.getOperation(String name) |
Operation |
SpannerRpc.getOperation(String name)
Retrieves a long running operation.
|
SpannerRpc.Paginated<com.google.spanner.admin.database.v1.Database> |
GapicSpannerRpc.listDatabases(String instanceName,
int pageSize,
String pageToken) |
SpannerRpc.Paginated<com.google.spanner.admin.database.v1.Database> |
SpannerRpc.listDatabases(String instanceName,
int pageSize,
String pageToken) |
SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.InstanceConfig> |
GapicSpannerRpc.listInstanceConfigs(int pageSize,
String pageToken) |
SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.InstanceConfig> |
SpannerRpc.listInstanceConfigs(int pageSize,
String pageToken) |
SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.Instance> |
GapicSpannerRpc.listInstances(int pageSize,
String pageToken,
String filter) |
SpannerRpc.Paginated<com.google.spanner.admin.instance.v1.Instance> |
SpannerRpc.listInstances(int pageSize,
String pageToken,
String filter) |
com.google.spanner.v1.PartitionResponse |
GapicSpannerRpc.partitionQuery(com.google.spanner.v1.PartitionQueryRequest request,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.PartitionResponse |
SpannerRpc.partitionQuery(com.google.spanner.v1.PartitionQueryRequest request,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.PartitionResponse |
GapicSpannerRpc.partitionRead(com.google.spanner.v1.PartitionReadRequest request,
Map<SpannerRpc.Option,?> options) |
com.google.spanner.v1.PartitionResponse |
SpannerRpc.partitionRead(com.google.spanner.v1.PartitionReadRequest request,
Map<SpannerRpc.Option,?> options) |
void |
GapicSpannerRpc.rollback(com.google.spanner.v1.RollbackRequest request,
Map<SpannerRpc.Option,?> options) |
void |
SpannerRpc.rollback(com.google.spanner.v1.RollbackRequest request,
Map<SpannerRpc.Option,?> options) |
OperationFuture<Empty,com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata> |
GapicSpannerRpc.updateDatabaseDdl(String databaseName,
Iterable<String> updateDatabaseStatements,
String updateId) |
OperationFuture<Empty,com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata> |
SpannerRpc.updateDatabaseDdl(String databaseName,
Iterable<String> updateDatabaseStatements,
String updateId) |
OperationFuture<com.google.spanner.admin.instance.v1.Instance,com.google.spanner.admin.instance.v1.UpdateInstanceMetadata> |
GapicSpannerRpc.updateInstance(com.google.spanner.admin.instance.v1.Instance instance,
FieldMask fieldMask) |
OperationFuture<com.google.spanner.admin.instance.v1.Instance,com.google.spanner.admin.instance.v1.UpdateInstanceMetadata> |
SpannerRpc.updateInstance(com.google.spanner.admin.instance.v1.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.