Class: Google::Cloud::Bigquery::StandardSql::StructType
- Inherits:
-
Object
- Object
- Google::Cloud::Bigquery::StandardSql::StructType
- Defined in:
- lib/google/cloud/bigquery/standard_sql.rb
Overview
The fields of a STRUCT
type. See DataType#struct_type. See Routine and Argument.
Helpers collapse
-
#fields ⇒ Array<Field>
The fields of the struct.
-
#initialize(fields) ⇒ StructType
constructor
Creates a new, immutable StandardSql::StructType object.
Constructor Details
#initialize(fields) ⇒ StructType
Creates a new, immutable StandardSql::StructType object.
473 474 475 476 477 |
# File 'lib/google/cloud/bigquery/standard_sql.rb', line 473 def initialize **kwargs # Convert each field client object to gapi object, if fields given (self.from_gapi does not pass kwargs) kwargs[:fields] = kwargs[:fields]&.map(&:to_gapi) if kwargs[:fields] @gapi = Google::Apis::BigqueryV2::StandardSqlStructType.new(**kwargs) end |