Class: StatelyDB::SyncResult
- Inherits:
-
Object
- Object
- StatelyDB::SyncResult
- Defined in:
- lib/statelydb.rb
Overview
SyncResult represents the results of a sync operation.
Instance Attribute Summary collapse
-
#changed_items ⇒ Array<StatelyDB::Item>
readonly
the items that were changed.
-
#deleted_item_paths ⇒ Array<String>
readonly
the key paths that were deleted.
-
#is_reset ⇒ Boolean
readonly
whether the sync operation reset the token.
-
#token ⇒ StatelyDB::Token
readonly
the token to continue from.
-
#updated_outside_list_window_paths ⇒ Array<String>
readonly
the key paths of items that were updated but Stately cannot tell if they were in the sync window.
Instance Method Summary collapse
-
#initialize(changed_items:, deleted_item_paths:, updated_outside_list_window_paths:, is_reset:, token:) ⇒ SyncResult
constructor
A new instance of SyncResult.
Constructor Details
#initialize(changed_items:, deleted_item_paths:, updated_outside_list_window_paths:, is_reset:, token:) ⇒ SyncResult
Returns a new instance of SyncResult.
398 399 400 401 402 403 404 |
# File 'lib/statelydb.rb', line 398 def initialize(changed_items:, deleted_item_paths:, updated_outside_list_window_paths:, is_reset:, token:) @changed_items = changed_items @deleted_item_paths = deleted_item_paths @updated_outside_list_window_paths = updated_outside_list_window_paths @is_reset = is_reset @token = token end |
Instance Attribute Details
#changed_items ⇒ Array<StatelyDB::Item> (readonly)
the items that were changed
389 390 391 |
# File 'lib/statelydb.rb', line 389 def changed_items @changed_items end |
#deleted_item_paths ⇒ Array<String> (readonly)
the key paths that were deleted
389 390 391 |
# File 'lib/statelydb.rb', line 389 def deleted_item_paths @deleted_item_paths end |
#is_reset ⇒ Boolean (readonly)
whether the sync operation reset the token
389 390 391 |
# File 'lib/statelydb.rb', line 389 def is_reset @is_reset end |
#token ⇒ StatelyDB::Token (readonly)
the token to continue from
389 390 391 |
# File 'lib/statelydb.rb', line 389 def token @token end |
#updated_outside_list_window_paths ⇒ Array<String> (readonly)
the key paths of items that were updated but Stately cannot tell if they were in the sync window. Treat these as deleted in most cases.
389 390 391 |
# File 'lib/statelydb.rb', line 389 def updated_outside_list_window_paths @updated_outside_list_window_paths end |