Class: Google::Apis::BigtableadminV2::Type
- Inherits:
-
Object
- Object
- Google::Apis::BigtableadminV2::Type
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/bigtableadmin_v2/classes.rb,
lib/google/apis/bigtableadmin_v2/representations.rb,
lib/google/apis/bigtableadmin_v2/representations.rb
Overview
Type
represents the type of data that is written to, read from, or stored in
Bigtable. It is heavily based on the GoogleSQL standard to help maintain
familiarity and consistency across products and features. For compatibility
with Bigtable's existing untyped APIs, each Type
includes an Encoding
which describes how to convert to/from the underlying data. Each encoding also
defines the following properties: * Order-preserving: Does the encoded value
sort consistently with the original typed value? Note that Bigtable will
always sort data based on the raw encoded value, not the decoded type. -
Example: BYTES values sort in the same order as their raw encodings. -
Counterexample: Encoding INT64 as a fixed-width decimal string does not
preserve sort order when dealing with negative numbers. INT64(1) > INT64(-1)
,
but STRING("-00001") > STRING("00001)
. * Self-delimiting: If we concatenate
two encoded values, can we always tell where the first one ends and the second
one begins? - Example: If we encode INT64s to fixed-width STRINGs, the first
value will always contain exactly N digits, possibly preceded by a sign. -
Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have no way to
tell where the first one ends. * Compatibility: Which other systems have
matching encoding schemes? For example, does this encoding have a GoogleSQL
equivalent? HBase? Java?
Instance Attribute Summary collapse
-
#aggregate_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeAggregate
A value that combines incremental updates into a summarized value.
-
#array_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeArray
An ordered list of elements of a given type.
-
#bool_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeBool
bool Values of type
Bool
are stored inValue.bool_value
. -
#bytes_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeBytes
Bytes Values of type
Bytes
are stored inValue.bytes_value
. -
#date_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeDate
Date Values of type
Date
are stored inValue.date_value
. -
#float32_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeFloat32
Float32 Values of type
Float32
are stored inValue.float_value
. -
#float64_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeFloat64
Float64 Values of type
Float64
are stored inValue.float_value
. -
#int64_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeInt64
Int64 Values of type
Int64
are stored inValue.int_value
. -
#map_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeMap
A mapping of keys to values of a given type.
-
#string_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeString
String Values of type
String
are stored inValue.string_value
. -
#struct_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeStruct
A structured data value, consisting of fields which map to dynamically typed values.
-
#timestamp_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeTimestamp
Timestamp Values of type
Timestamp
are stored inValue.timestamp_value
.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Type
constructor
A new instance of Type.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Type
Returns a new instance of Type.
3617 3618 3619 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3617 def initialize(**args) update!(**args) end |
Instance Attribute Details
#aggregate_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeAggregate
A value that combines incremental updates into a summarized value. Data is
never directly written or read using type Aggregate
. Writes will provide
either the input_type
or state_type
, and reads will always return the
state_type
.
Corresponds to the JSON property aggregateType
3552 3553 3554 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3552 def aggregate_type @aggregate_type end |
#array_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeArray
An ordered list of elements of a given type. Values of type Array
are stored
in Value.array_value
.
Corresponds to the JSON property arrayType
3558 3559 3560 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3558 def array_type @array_type end |
#bool_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeBool
bool Values of type Bool
are stored in Value.bool_value
.
Corresponds to the JSON property boolType
3563 3564 3565 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3563 def bool_type @bool_type end |
#bytes_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeBytes
Bytes Values of type Bytes
are stored in Value.bytes_value
.
Corresponds to the JSON property bytesType
3568 3569 3570 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3568 def bytes_type @bytes_type end |
#date_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeDate
Date Values of type Date
are stored in Value.date_value
.
Corresponds to the JSON property dateType
3573 3574 3575 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3573 def date_type @date_type end |
#float32_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeFloat32
Float32 Values of type Float32
are stored in Value.float_value
.
Corresponds to the JSON property float32Type
3578 3579 3580 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3578 def float32_type @float32_type end |
#float64_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeFloat64
Float64 Values of type Float64
are stored in Value.float_value
.
Corresponds to the JSON property float64Type
3583 3584 3585 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3583 def float64_type @float64_type end |
#int64_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeInt64
Int64 Values of type Int64
are stored in Value.int_value
.
Corresponds to the JSON property int64Type
3588 3589 3590 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3588 def int64_type @int64_type end |
#map_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeMap
A mapping of keys to values of a given type. Values of type Map
are stored
in a Value.array_value
where each entry is another Value.array_value
with
two elements (the key and the value, in that order). Normally encoded Map
values won't have repeated keys, however, clients are expected to handle the
case in which they do. If the same key appears multiple times, the last
value takes precedence.
Corresponds to the JSON property mapType
3598 3599 3600 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3598 def map_type @map_type end |
#string_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeString
String Values of type String
are stored in Value.string_value
.
Corresponds to the JSON property stringType
3603 3604 3605 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3603 def string_type @string_type end |
#struct_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeStruct
A structured data value, consisting of fields which map to dynamically typed
values. Values of type Struct
are stored in Value.array_value
where
entries are in the same order and number as field_types
.
Corresponds to the JSON property structType
3610 3611 3612 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3610 def struct_type @struct_type end |
#timestamp_type ⇒ Google::Apis::BigtableadminV2::GoogleBigtableAdminV2TypeTimestamp
Timestamp Values of type Timestamp
are stored in Value.timestamp_value
.
Corresponds to the JSON property timestampType
3615 3616 3617 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3615 def @timestamp_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 |
# File 'lib/google/apis/bigtableadmin_v2/classes.rb', line 3622 def update!(**args) @aggregate_type = args[:aggregate_type] if args.key?(:aggregate_type) @array_type = args[:array_type] if args.key?(:array_type) @bool_type = args[:bool_type] if args.key?(:bool_type) @bytes_type = args[:bytes_type] if args.key?(:bytes_type) @date_type = args[:date_type] if args.key?(:date_type) @float32_type = args[:float32_type] if args.key?(:float32_type) @float64_type = args[:float64_type] if args.key?(:float64_type) @int64_type = args[:int64_type] if args.key?(:int64_type) @map_type = args[:map_type] if args.key?(:map_type) @string_type = args[:string_type] if args.key?(:string_type) @struct_type = args[:struct_type] if args.key?(:struct_type) @timestamp_type = args[:timestamp_type] if args.key?(:timestamp_type) end |