Class: Google::Apis::BigqueryV2::Argument

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

Overview

Input/output argument of a function or a stored procedure.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Argument

Returns a new instance of Argument.



160
161
162
# File 'lib/google/apis/bigquery_v2/classes.rb', line 160

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

Instance Attribute Details

#argument_kindString

Optional. Defaults to FIXED_TYPE. Corresponds to the JSON property argumentKind

Returns:

  • (String)


127
128
129
# File 'lib/google/apis/bigquery_v2/classes.rb', line 127

def argument_kind
  @argument_kind
end

#data_typeGoogle::Apis::BigqueryV2::StandardSqlDataType

The data type of a variable such as a function argument. Examples include: * INT64: "typeKind": "INT64" * ARRAY: "typeKind": "ARRAY", " arrayElementType":"typeKind": "STRING" * STRUCT>: "typeKind": "STRUCT", "structType": "fields": [ "name": "x", "type":"typeKind": "STRING", "name": "y", "type": "typeKind": "ARRAY", "arrayElementType": "typeKind": " DATE" ] Corresponds to the JSON property dataType



137
138
139
# File 'lib/google/apis/bigquery_v2/classes.rb', line 137

def data_type
  @data_type
end

#is_aggregateBoolean Also known as: is_aggregate?

Optional. Whether the argument is an aggregate function parameter. Must be Unset for routine types other than AGGREGATE_FUNCTION. For AGGREGATE_FUNCTION, if set to false, it is equivalent to adding "NOT AGGREGATE" clause in DDL; Otherwise, it is equivalent to omitting "NOT AGGREGATE" clause in DDL. Corresponds to the JSON property isAggregate

Returns:

  • (Boolean)


145
146
147
# File 'lib/google/apis/bigquery_v2/classes.rb', line 145

def is_aggregate
  @is_aggregate
end

#modeString

Optional. Specifies whether the argument is input or output. Can be set for procedures only. Corresponds to the JSON property mode

Returns:

  • (String)


152
153
154
# File 'lib/google/apis/bigquery_v2/classes.rb', line 152

def mode
  @mode
end

#nameString

Optional. The name of this argument. Can be absent for function return argument. Corresponds to the JSON property name

Returns:

  • (String)


158
159
160
# File 'lib/google/apis/bigquery_v2/classes.rb', line 158

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



165
166
167
168
169
170
171
# File 'lib/google/apis/bigquery_v2/classes.rb', line 165

def update!(**args)
  @argument_kind = args[:argument_kind] if args.key?(:argument_kind)
  @data_type = args[:data_type] if args.key?(:data_type)
  @is_aggregate = args[:is_aggregate] if args.key?(:is_aggregate)
  @mode = args[:mode] if args.key?(:mode)
  @name = args[:name] if args.key?(:name)
end