Documentation ¶
Index ¶
- Variables
- type CreateDatabaseMetadata
- type CreateDatabaseRequest
- func (*CreateDatabaseRequest) Descriptor() ([]byte, []int)
- func (m *CreateDatabaseRequest) GetCreateStatement() string
- func (m *CreateDatabaseRequest) GetExtraStatements() []string
- func (m *CreateDatabaseRequest) GetParent() string
- func (*CreateDatabaseRequest) ProtoMessage()
- func (m *CreateDatabaseRequest) Reset()
- func (m *CreateDatabaseRequest) String() string
- type Database
- type Database_State
- type DropDatabaseRequest
- type GetDatabaseDdlRequest
- type GetDatabaseDdlResponse
- type GetDatabaseRequest
- type ListDatabasesRequest
- func (*ListDatabasesRequest) Descriptor() ([]byte, []int)
- func (m *ListDatabasesRequest) GetPageSize() int32
- func (m *ListDatabasesRequest) GetPageToken() string
- func (m *ListDatabasesRequest) GetParent() string
- func (*ListDatabasesRequest) ProtoMessage()
- func (m *ListDatabasesRequest) Reset()
- func (m *ListDatabasesRequest) String() string
- type ListDatabasesResponse
- func (*ListDatabasesResponse) Descriptor() ([]byte, []int)
- func (m *ListDatabasesResponse) GetDatabases() []*Database
- func (m *ListDatabasesResponse) GetNextPageToken() string
- func (*ListDatabasesResponse) ProtoMessage()
- func (m *ListDatabasesResponse) Reset()
- func (m *ListDatabasesResponse) String() string
- type UpdateDatabaseDdlMetadata
- func (*UpdateDatabaseDdlMetadata) Descriptor() ([]byte, []int)
- func (m *UpdateDatabaseDdlMetadata) GetCommitTimestamps() []*google_protobuf3.Timestamp
- func (m *UpdateDatabaseDdlMetadata) GetDatabase() string
- func (m *UpdateDatabaseDdlMetadata) GetStatements() []string
- func (*UpdateDatabaseDdlMetadata) ProtoMessage()
- func (m *UpdateDatabaseDdlMetadata) Reset()
- func (m *UpdateDatabaseDdlMetadata) String() string
- type UpdateDatabaseDdlRequest
- func (*UpdateDatabaseDdlRequest) Descriptor() ([]byte, []int)
- func (m *UpdateDatabaseDdlRequest) GetDatabase() string
- func (m *UpdateDatabaseDdlRequest) GetOperationId() string
- func (m *UpdateDatabaseDdlRequest) GetStatements() []string
- func (*UpdateDatabaseDdlRequest) ProtoMessage()
- func (m *UpdateDatabaseDdlRequest) Reset()
- func (m *UpdateDatabaseDdlRequest) String() string
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CreateDatabaseMetadata ¶
type CreateDatabaseMetadata struct { // The database being created. Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` }
Metadata type for the operation returned by [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
func (*CreateDatabaseMetadata) Descriptor ¶
func (*CreateDatabaseMetadata) Descriptor() ([]byte, []int)
func (*CreateDatabaseMetadata) GetDatabase ¶
func (m *CreateDatabaseMetadata) GetDatabase() string
func (*CreateDatabaseMetadata) ProtoMessage ¶
func (*CreateDatabaseMetadata) ProtoMessage()
func (*CreateDatabaseMetadata) Reset ¶
func (m *CreateDatabaseMetadata) Reset()
func (*CreateDatabaseMetadata) String ¶
func (m *CreateDatabaseMetadata) String() string
type CreateDatabaseRequest ¶
type CreateDatabaseRequest struct { // Required. The name of the instance that will serve the new database. // Values are of the form `projects/<project>/instances/<instance>`. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Required. A `CREATE DATABASE` statement, which specifies the ID of the // new database. The database ID must conform to the regular expression // `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length. // If the database ID is a reserved word or if it contains a hyphen, the // database ID must be enclosed in backticks (“ ` “). CreateStatement string `protobuf:"bytes,2,opt,name=create_statement,json=createStatement,proto3" json:"create_statement,omitempty"` // An optional list of DDL statements to run inside the newly created // database. Statements can create tables, indexes, etc. These // statements execute atomically with the creation of the database: // if there is an error in any statement, the database is not created. ExtraStatements []string `protobuf:"bytes,3,rep,name=extra_statements,json=extraStatements" json:"extra_statements,omitempty"` }
The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
func (*CreateDatabaseRequest) Descriptor ¶
func (*CreateDatabaseRequest) Descriptor() ([]byte, []int)
func (*CreateDatabaseRequest) GetCreateStatement ¶
func (m *CreateDatabaseRequest) GetCreateStatement() string
func (*CreateDatabaseRequest) GetExtraStatements ¶
func (m *CreateDatabaseRequest) GetExtraStatements() []string
func (*CreateDatabaseRequest) GetParent ¶
func (m *CreateDatabaseRequest) GetParent() string
func (*CreateDatabaseRequest) ProtoMessage ¶
func (*CreateDatabaseRequest) ProtoMessage()
func (*CreateDatabaseRequest) Reset ¶
func (m *CreateDatabaseRequest) Reset()
func (*CreateDatabaseRequest) String ¶
func (m *CreateDatabaseRequest) String() string
type Database ¶
type Database struct { // Required. The name of the database. Values are of the form // `projects/<project>/instances/<instance>/databases/<database>`, // where `<database>` is as specified in the `CREATE DATABASE` // statement. This name can be passed to other API methods to // identify the database. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Output only. The current database state. State Database_State `protobuf:"varint,2,opt,name=state,proto3,enum=google.spanner.admin.database.v1.Database_State" json:"state,omitempty"` }
A Cloud Spanner database.
func (*Database) GetState ¶
func (m *Database) GetState() Database_State
type Database_State ¶
type Database_State int32
Indicates the current state of the database.
const ( // Not specified. Database_STATE_UNSPECIFIED Database_State = 0 // The database is still being created. Operations on the database may fail // with `FAILED_PRECONDITION` in this state. Database_CREATING Database_State = 1 // The database is fully created and ready for use. Database_READY Database_State = 2 )
func (Database_State) EnumDescriptor ¶
func (Database_State) EnumDescriptor() ([]byte, []int)
func (Database_State) String ¶
func (x Database_State) String() string
type DropDatabaseRequest ¶
type DropDatabaseRequest struct { // Required. The database to be dropped. Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` }
The request for [DropDatabase][google.spanner.admin.database.v1.DatabaseAdmin.DropDatabase].
func (*DropDatabaseRequest) Descriptor ¶
func (*DropDatabaseRequest) Descriptor() ([]byte, []int)
func (*DropDatabaseRequest) GetDatabase ¶
func (m *DropDatabaseRequest) GetDatabase() string
func (*DropDatabaseRequest) ProtoMessage ¶
func (*DropDatabaseRequest) ProtoMessage()
func (*DropDatabaseRequest) Reset ¶
func (m *DropDatabaseRequest) Reset()
func (*DropDatabaseRequest) String ¶
func (m *DropDatabaseRequest) String() string
type GetDatabaseDdlRequest ¶
type GetDatabaseDdlRequest struct { // Required. The database whose schema we wish to get. Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` }
The request for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
func (*GetDatabaseDdlRequest) Descriptor ¶
func (*GetDatabaseDdlRequest) Descriptor() ([]byte, []int)
func (*GetDatabaseDdlRequest) GetDatabase ¶
func (m *GetDatabaseDdlRequest) GetDatabase() string
func (*GetDatabaseDdlRequest) ProtoMessage ¶
func (*GetDatabaseDdlRequest) ProtoMessage()
func (*GetDatabaseDdlRequest) Reset ¶
func (m *GetDatabaseDdlRequest) Reset()
func (*GetDatabaseDdlRequest) String ¶
func (m *GetDatabaseDdlRequest) String() string
type GetDatabaseDdlResponse ¶
type GetDatabaseDdlResponse struct { // A list of formatted DDL statements defining the schema of the database // specified in the request. Statements []string `protobuf:"bytes,1,rep,name=statements" json:"statements,omitempty"` }
The response for [GetDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabaseDdl].
func (*GetDatabaseDdlResponse) Descriptor ¶
func (*GetDatabaseDdlResponse) Descriptor() ([]byte, []int)
func (*GetDatabaseDdlResponse) GetStatements ¶
func (m *GetDatabaseDdlResponse) GetStatements() []string
func (*GetDatabaseDdlResponse) ProtoMessage ¶
func (*GetDatabaseDdlResponse) ProtoMessage()
func (*GetDatabaseDdlResponse) Reset ¶
func (m *GetDatabaseDdlResponse) Reset()
func (*GetDatabaseDdlResponse) String ¶
func (m *GetDatabaseDdlResponse) String() string
type GetDatabaseRequest ¶
type GetDatabaseRequest struct { // Required. The name of the requested database. Values are of the form // `projects/<project>/instances/<instance>/databases/<database>`. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` }
The request for [GetDatabase][google.spanner.admin.database.v1.DatabaseAdmin.GetDatabase].
func (*GetDatabaseRequest) Descriptor ¶
func (*GetDatabaseRequest) Descriptor() ([]byte, []int)
func (*GetDatabaseRequest) GetName ¶
func (m *GetDatabaseRequest) GetName() string
func (*GetDatabaseRequest) ProtoMessage ¶
func (*GetDatabaseRequest) ProtoMessage()
func (*GetDatabaseRequest) Reset ¶
func (m *GetDatabaseRequest) Reset()
func (*GetDatabaseRequest) String ¶
func (m *GetDatabaseRequest) String() string
type ListDatabasesRequest ¶
type ListDatabasesRequest struct { // Required. The instance whose databases should be listed. // Values are of the form `projects/<project>/instances/<instance>`. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` // Number of databases to be returned in the response. If 0 or less, // defaults to the server's maximum allowed page size. PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // If non-empty, `page_token` should contain a // [next_page_token][google.spanner.admin.database.v1.ListDatabasesResponse.next_page_token] from a // previous [ListDatabasesResponse][google.spanner.admin.database.v1.ListDatabasesResponse]. PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` }
The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
func (*ListDatabasesRequest) Descriptor ¶
func (*ListDatabasesRequest) Descriptor() ([]byte, []int)
func (*ListDatabasesRequest) GetPageSize ¶
func (m *ListDatabasesRequest) GetPageSize() int32
func (*ListDatabasesRequest) GetPageToken ¶
func (m *ListDatabasesRequest) GetPageToken() string
func (*ListDatabasesRequest) GetParent ¶
func (m *ListDatabasesRequest) GetParent() string
func (*ListDatabasesRequest) ProtoMessage ¶
func (*ListDatabasesRequest) ProtoMessage()
func (*ListDatabasesRequest) Reset ¶
func (m *ListDatabasesRequest) Reset()
func (*ListDatabasesRequest) String ¶
func (m *ListDatabasesRequest) String() string
type ListDatabasesResponse ¶
type ListDatabasesResponse struct { // Databases that matched the request. Databases []*Database `protobuf:"bytes,1,rep,name=databases" json:"databases,omitempty"` // `next_page_token` can be sent in a subsequent // [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases] call to fetch more // of the matching databases. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` }
The response for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].
func (*ListDatabasesResponse) Descriptor ¶
func (*ListDatabasesResponse) Descriptor() ([]byte, []int)
func (*ListDatabasesResponse) GetDatabases ¶
func (m *ListDatabasesResponse) GetDatabases() []*Database
func (*ListDatabasesResponse) GetNextPageToken ¶
func (m *ListDatabasesResponse) GetNextPageToken() string
func (*ListDatabasesResponse) ProtoMessage ¶
func (*ListDatabasesResponse) ProtoMessage()
func (*ListDatabasesResponse) Reset ¶
func (m *ListDatabasesResponse) Reset()
func (*ListDatabasesResponse) String ¶
func (m *ListDatabasesResponse) String() string
type UpdateDatabaseDdlMetadata ¶
type UpdateDatabaseDdlMetadata struct { // The database being modified. Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` // For an update this list contains all the statements. For an // individual statement, this list contains only that statement. Statements []string `protobuf:"bytes,2,rep,name=statements" json:"statements,omitempty"` // Reports the commit timestamps of all statements that have // succeeded so far, where `commit_timestamps[i]` is the commit // timestamp for the statement `statements[i]`. CommitTimestamps []*google_protobuf3.Timestamp `protobuf:"bytes,3,rep,name=commit_timestamps,json=commitTimestamps" json:"commit_timestamps,omitempty"` }
Metadata type for the operation returned by [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl].
func (*UpdateDatabaseDdlMetadata) Descriptor ¶
func (*UpdateDatabaseDdlMetadata) Descriptor() ([]byte, []int)
func (*UpdateDatabaseDdlMetadata) GetCommitTimestamps ¶
func (m *UpdateDatabaseDdlMetadata) GetCommitTimestamps() []*google_protobuf3.Timestamp
func (*UpdateDatabaseDdlMetadata) GetDatabase ¶
func (m *UpdateDatabaseDdlMetadata) GetDatabase() string
func (*UpdateDatabaseDdlMetadata) GetStatements ¶
func (m *UpdateDatabaseDdlMetadata) GetStatements() []string
func (*UpdateDatabaseDdlMetadata) ProtoMessage ¶
func (*UpdateDatabaseDdlMetadata) ProtoMessage()
func (*UpdateDatabaseDdlMetadata) Reset ¶
func (m *UpdateDatabaseDdlMetadata) Reset()
func (*UpdateDatabaseDdlMetadata) String ¶
func (m *UpdateDatabaseDdlMetadata) String() string
type UpdateDatabaseDdlRequest ¶
type UpdateDatabaseDdlRequest struct { // Required. The database to update. Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` // DDL statements to be applied to the database. Statements []string `protobuf:"bytes,2,rep,name=statements" json:"statements,omitempty"` // If empty, the new update request is assigned an // automatically-generated operation ID. Otherwise, `operation_id` // is used to construct the name of the resulting // [Operation][google.longrunning.Operation]. // // Specifying an explicit operation ID simplifies determining // whether the statements were executed in the event that the // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, // or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and // `operation_id` fields can be combined to form the // [name][google.longrunning.Operation.name] of the resulting // [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`. // // `operation_id` should be unique within the database, and must be // a valid identifier: `[a-z][a-z0-9_]*`. Note that // automatically-generated operation IDs always begin with an // underscore. If the named operation already exists, // [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns // `ALREADY_EXISTS`. OperationId string `protobuf:"bytes,3,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` }
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. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before enqueueing them, but they may still fail upon later execution (e.g., if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a `NULL` value in a column to which `NOT NULL` would be added). If a statement fails, all subsequent statements in the batch are automatically cancelled.
Each batch of statements is assigned a name which can be used with the [Operations][google.longrunning.Operations] API to monitor progress. See the [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more details.
func (*UpdateDatabaseDdlRequest) Descriptor ¶
func (*UpdateDatabaseDdlRequest) Descriptor() ([]byte, []int)
func (*UpdateDatabaseDdlRequest) GetDatabase ¶
func (m *UpdateDatabaseDdlRequest) GetDatabase() string
func (*UpdateDatabaseDdlRequest) GetOperationId ¶
func (m *UpdateDatabaseDdlRequest) GetOperationId() string
func (*UpdateDatabaseDdlRequest) GetStatements ¶
func (m *UpdateDatabaseDdlRequest) GetStatements() []string
func (*UpdateDatabaseDdlRequest) ProtoMessage ¶
func (*UpdateDatabaseDdlRequest) ProtoMessage()
func (*UpdateDatabaseDdlRequest) Reset ¶
func (m *UpdateDatabaseDdlRequest) Reset()
func (*UpdateDatabaseDdlRequest) String ¶
func (m *UpdateDatabaseDdlRequest) String() string