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.



2218
2219
2220
# File 'lib/google/apis/spanner_v1/classes.rb', line 2218

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

Instance Attribute Details

#actionString

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

Returns:

  • (String)


2201
2202
2203
# File 'lib/google/apis/spanner_v1/classes.rb', line 2201

def action
  @action
end

#entity_namesArray<String>

The entity names being operated on the DDL statement. For example, 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>)


2209
2210
2211
# File 'lib/google/apis/spanner_v1/classes.rb', line 2209

def entity_names
  @entity_names
end

#entity_typeString

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

Returns:

  • (String)


2216
2217
2218
# File 'lib/google/apis/spanner_v1/classes.rb', line 2216

def entity_type
  @entity_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2223
2224
2225
2226
2227
# File 'lib/google/apis/spanner_v1/classes.rb', line 2223

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