Class: Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord
- Inherits:
-
Object
- Object
- Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/spanner/v1/change_stream.rb
Overview
A data change record contains a set of changes to a table with the same modification type (insert, update, or delete) committed at the same commit timestamp in one change stream partition for the same transaction. Multiple data change records can be returned for the same transaction across multiple change stream partitions.
Defined Under Namespace
Modules: ModType, ValueCaptureType Classes: ColumnMetadata, Mod, ModValue
Instance Attribute Summary collapse
-
#column_metadata ⇒ ::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ColumnMetadata>
Provides metadata describing the columns associated with the mods listed below.
-
#commit_timestamp ⇒ ::Google::Protobuf::Timestamp
Indicates the timestamp in which the change was committed.
-
#is_last_record_in_transaction_in_partition ⇒ ::Boolean
Indicates whether this is the last record for a transaction in the current partition.
-
#is_system_transaction ⇒ ::Boolean
Indicates whether the transaction is a system transaction.
-
#mod_type ⇒ ::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType
Describes the type of change.
-
#mods ⇒ ::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod>
Describes the changes that were made.
-
#number_of_partitions_in_transaction ⇒ ::Integer
Indicates the number of partitions that return data change records for this transaction.
-
#number_of_records_in_transaction ⇒ ::Integer
Indicates the number of data change records that are part of this transaction across all change stream partitions.
-
#record_sequence ⇒ ::String
Record sequence numbers are unique and monotonically increasing (but not necessarily contiguous) for a specific timestamp across record types in the same partition.
-
#server_transaction_id ⇒ ::String
Provides a globally unique string that represents the transaction in which the change was committed.
-
#table ⇒ ::String
Name of the table affected by the change.
-
#transaction_tag ⇒ ::String
Indicates the transaction tag associated with this transaction.
-
#value_capture_type ⇒ ::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType
Describes the value capture type that was specified in the change stream configuration when this change was captured.
Instance Attribute Details
#column_metadata ⇒ ::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ColumnMetadata>
Returns Provides metadata describing the columns associated with the mods listed below.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#commit_timestamp ⇒ ::Google::Protobuf::Timestamp
Returns Indicates the timestamp in which the change was committed. DataChangeRecord.commit_timestamps, PartitionStartRecord.start_timestamps, PartitionEventRecord.commit_timestamps, and PartitionEndRecord.end_timestamps can have the same value in the same partition.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#is_last_record_in_transaction_in_partition ⇒ ::Boolean
Returns Indicates whether this is the last record for a transaction in the current partition. Clients can use this field to determine when all records for a transaction in the current partition have been received.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#is_system_transaction ⇒ ::Boolean
Returns Indicates whether the transaction is a system transaction. System transactions include those issued by time-to-live (TTL), column backfill, etc.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#mod_type ⇒ ::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType
Returns Describes the type of change.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#mods ⇒ ::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod>
Returns Describes the changes that were made.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#number_of_partitions_in_transaction ⇒ ::Integer
Returns Indicates the number of partitions that return data change records for this transaction. This value can be helpful in assembling all records associated with a particular transaction.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#number_of_records_in_transaction ⇒ ::Integer
Returns Indicates the number of data change records that are part of this transaction across all change stream partitions. This value can be used to assemble all the records associated with a particular transaction.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#record_sequence ⇒ ::String
Returns Record sequence numbers are unique and monotonically increasing (but not necessarily contiguous) for a specific timestamp across record types in the same partition. To guarantee ordered processing, the reader should process records (of potentially different types) in record_sequence order for a specific timestamp in the same partition.
The record sequence number ordering across partitions is only meaningful in the context of a specific transaction. Record sequence numbers are unique across partitions for a specific transaction. Sort the DataChangeRecords for the same server_transaction_id by record_sequence to reconstruct the ordering of the changes within the transaction.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#server_transaction_id ⇒ ::String
Returns Provides a globally unique string that represents the transaction in which the change was committed. Multiple transactions can have the same commit timestamp, but each transaction has a unique server_transaction_id.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#table ⇒ ::String
Returns Name of the table affected by the change.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#transaction_tag ⇒ ::String
Returns Indicates the transaction tag associated with this transaction.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |
#value_capture_type ⇒ ::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType
Returns Describes the value capture type that was specified in the change stream configuration when this change was captured.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'proto_docs/google/spanner/v1/change_stream.rb', line 143 class DataChangeRecord include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Metadata for a column. # @!attribute [rw] name # @return [::String] # Name of the column. # @!attribute [rw] type # @return [::Google::Cloud::Spanner::V1::Type] # Type of the column. # @!attribute [rw] is_primary_key # @return [::Boolean] # Indicates whether the column is a primary key column. # @!attribute [rw] ordinal_position # @return [::Integer] # Ordinal position of the column based on the original table definition # in the schema starting with a value of 1. class ColumnMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Returns the value and associated metadata for a particular field of the # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::Mod Mod}. # @!attribute [rw] column_metadata_index # @return [::Integer] # Index within the repeated # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord#column_metadata column_metadata} # field, to obtain the column metadata for the column that was modified. # @!attribute [rw] value # @return [::Google::Protobuf::Value] # The value of the column. class ModValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A mod describes all data changes in a watched table row. # @!attribute [rw] keys # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the value of the primary key of the modified row. # @!attribute [rw] old_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the old values before the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::INSERT INSERT}, # or if old values are not being captured specified by # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ValueCaptureType value_capture_type}. # @!attribute [rw] new_values # @return [::Array<::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModValue>] # Returns the new values after the change for the modified columns. # Always empty for # {::Google::Cloud::Spanner::V1::ChangeStreamRecord::DataChangeRecord::ModType::DELETE DELETE}. class Mod include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Mod type describes the type of change Spanner applied to the data. For # example, if the client submits an INSERT_OR_UPDATE request, Spanner will # perform an insert if there is no existing row and return ModType INSERT. # Alternatively, if there is an existing row, Spanner will perform an # update and return ModType UPDATE. module ModType # Not specified. MOD_TYPE_UNSPECIFIED = 0 # Indicates data was inserted. INSERT = 10 # Indicates existing data was updated. UPDATE = 20 # Indicates existing data was deleted. DELETE = 30 end # Value capture type describes which values are recorded in the data # change record. module ValueCaptureType # Not specified. VALUE_CAPTURE_TYPE_UNSPECIFIED = 0 # Records both old and new values of the modified watched columns. OLD_AND_NEW_VALUES = 10 # Records only new values of the modified watched columns. NEW_VALUES = 20 # Records new values of all watched columns, including modified and # unmodified columns. NEW_ROW = 30 # Records the new values of all watched columns, including modified and # unmodified columns. Also records the old values of the modified # columns. NEW_ROW_AND_OLD_VALUES = 40 end end |