Class: Google::Apis::SpannerV1::CreateDatabaseRequest
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::CreateDatabaseRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/spanner_v1/classes.rb,
generated/google/apis/spanner_v1/representations.rb,
generated/google/apis/spanner_v1/representations.rb
Overview
The request for CreateDatabase.
Instance Attribute Summary collapse
-
#create_statement ⇒ String
Required.
-
#extra_statements ⇒ Array<String>
An optional list of DDL statements to run inside the newly created database.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CreateDatabaseRequest
constructor
A new instance of CreateDatabaseRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ CreateDatabaseRequest
Returns a new instance of CreateDatabaseRequest
1809 1810 1811 |
# File 'generated/google/apis/spanner_v1/classes.rb', line 1809 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_statement ⇒ String
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]
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 (`
).
Corresponds to the JSON property createStatement
1807 1808 1809 |
# File 'generated/google/apis/spanner_v1/classes.rb', line 1807 def create_statement @create_statement end |
#extra_statements ⇒ Array<String>
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.
Corresponds to the JSON property extraStatements
1798 1799 1800 |
# File 'generated/google/apis/spanner_v1/classes.rb', line 1798 def extra_statements @extra_statements end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1814 1815 1816 1817 |
# File 'generated/google/apis/spanner_v1/classes.rb', line 1814 def update!(**args) @extra_statements = args[:extra_statements] if args.key?(:extra_statements) @create_statement = args[:create_statement] if args.key?(:create_statement) end |