Class: Google::Spanner::V1::StructType

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/spanner/v1/doc/google/spanner/v1/type.rb

Overview

StructType defines the fields of a STRUCT type.

Defined Under Namespace

Classes: Field

Instance Attribute Summary collapse

Instance Attribute Details

#fieldsArray<Google::Spanner::V1::StructType::Field>

Returns The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the SELECT clause of a query.

Returns:

  • (Array<Google::Spanner::V1::StructType::Field>)

    The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the SELECT clause of a query.



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/google/cloud/spanner/v1/doc/google/spanner/v1/type.rb', line 46

class StructType
  # Message representing a single field of a struct.
  # @!attribute [rw] name
  #   @return [String]
  #     The name of the field. For reads, this is the column name. For
  #     SQL queries, it is the column alias (e.g., `"Word"` in the
  #     query `"SELECT 'hello' AS Word"`), or the column name (e.g.,
  #     `"ColName"` in the query `"SELECT ColName FROM Table"`). Some
  #     columns might have an empty name (e.g., !"SELECT
  #     UPPER(ColName)"`). Note that a query result can contain
  #     multiple fields with the same name.
  # @!attribute [rw] type
  #   @return [Google::Spanner::V1::Type]
  #     The type of the field.
  class Field; end
end