Class: Google::Apis::SpannerV1::DdlStatementActionInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb

Overview

Action information extracted from a DDL statement. This proto is used to display the brief info of the DDL statement for the operation UpdateDatabaseDdl.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DdlStatementActionInfo

Returns a new instance of DdlStatementActionInfo.



2170
2171
2172
# File 'lib/google/apis/spanner_v1/classes.rb', line 2170

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#actionString

The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. This field is a non-empty string. Corresponds to the JSON property action

Returns:

  • (String)


2153
2154
2155
# File 'lib/google/apis/spanner_v1/classes.rb', line 2153

def action
  @action
end

#entity_namesArray<String>

The entity name(s) being operated on the DDL statement. E.g. 1. For statement " CREATE TABLE t1(...)", entity_names = ["t1"]. 2. For statement "GRANT ROLE r1, r2 ...", entity_names = ["r1", "r2"]. 3. For statement "ANALYZE", entity_names = []. Corresponds to the JSON property entityNames

Returns:

  • (Array<String>)


2161
2162
2163
# File 'lib/google/apis/spanner_v1/classes.rb', line 2161

def entity_names
  @entity_names
end

#entity_typeString

The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This field can be empty string for some DDL statement, e.g. for statement "ANALYZE", entity_type = "". Corresponds to the JSON property entityType

Returns:

  • (String)


2168
2169
2170
# File 'lib/google/apis/spanner_v1/classes.rb', line 2168

def entity_type
  @entity_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2175
2176
2177
2178
2179
# File 'lib/google/apis/spanner_v1/classes.rb', line 2175

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @entity_names = args[:entity_names] if args.key?(:entity_names)
  @entity_type = args[:entity_type] if args.key?(:entity_type)
end