statelydb 0.9.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ab280ee4fd3fa97d0664bdb6b5337fa2492fe952b3490f8cc6af1d93bd30174
4
- data.tar.gz: db12681d9ad3e39dd642cddda23dde195f1e584da9119659ba995daec303909b
3
+ metadata.gz: '039f735f87b49d58192914fdb0ff62cafce5d059980628671854026864248223'
4
+ data.tar.gz: 0ee06ba443aae408cb3a25d98041560a48f1ac6ddfd2ef9f25f13b62c21ee34c
5
5
  SHA512:
6
- metadata.gz: 5437b8f31d4300a9409b4bea9e4db3c2f046a3f8f1b3b9e55646c10fd1e24e37e1147ee2afe6a6562e8f4d1f6abc130b9525896c1c1b9816108adc27b5c62342
7
- data.tar.gz: dff2b5feb310a189392d270835e63110ab273ca54e71d12ae2fcd58222d412e364f80c8f7e849e4249241c4242ff8ada2595fa5ad1790580214a4efccbfba3f4
6
+ metadata.gz: 83ef6dd4a7fc6c98d3668ac42544d568105d78421a7c2bc8d0d56e588b4a39eac823473f2e8e797bb339c6c04459bfc39a07457cadf21590d5d90036ff808e61
7
+ data.tar.gz: ff67b6ef6513ebe45df1ad0c12ca8d1906cee183e830a3d303d4cd6eda47e2bbf6a22634a55057ece224b13f473df23ad428f324c52806ab7904d76cb47ef159
@@ -5,7 +5,7 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
 
8
- descriptor_data = "\n\x13\x64\x62/list_token.proto\x12\nstately.db\"h\n\tListToken\x12\x1d\n\ntoken_data\x18\x01 \x01(\x0cR\ttokenData\x12!\n\x0c\x63\x61n_continue\x18\x02 \x01(\x08R\x0b\x63\x61nContinue\x12\x19\n\x08\x63\x61n_sync\x18\x03 \x01(\x08R\x07\x63\x61nSyncBi\n\x0e\x63om.stately.dbB\x0eListTokenProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
8
+ descriptor_data = "\n\x13\x64\x62/list_token.proto\x12\nstately.db\"\x94\x01\n\tListToken\x12\x1d\n\ntoken_data\x18\x01 \x01(\x0cR\ttokenData\x12!\n\x0c\x63\x61n_continue\x18\x02 \x01(\x08R\x0b\x63\x61nContinue\x12\x19\n\x08\x63\x61n_sync\x18\x03 \x01(\x08R\x07\x63\x61nSync\x12*\n\x11schema_version_id\x18\x04 \x01(\rR\x0fschemaVersionIdBi\n\x0e\x63om.stately.dbB\x0eListTokenProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
9
9
 
10
10
  pool = Google::Protobuf::DescriptorPool.generated_pool
11
11
  pool.add_serialized_file(descriptor_data)
data/lib/statelydb.rb CHANGED
@@ -298,7 +298,8 @@ module StatelyDB
298
298
  raw_token = r.finished.token
299
299
  token = StatelyDB::Token.new(token_data: raw_token.token_data,
300
300
  can_continue: raw_token.can_continue,
301
- can_sync: raw_token.can_sync)
301
+ can_sync: raw_token.can_sync,
302
+ schema_version_id: raw_token.schema_version_id)
302
303
  end
303
304
  end
304
305
  [items, token]
@@ -334,7 +335,8 @@ module StatelyDB
334
335
  raw_token = r.finished.token
335
336
  token = StatelyDB::Token.new(token_data: raw_token.token_data,
336
337
  can_continue: raw_token.can_continue,
337
- can_sync: raw_token.can_sync)
338
+ can_sync: raw_token.can_sync,
339
+ schema_version_id: raw_token.schema_version_id)
338
340
  end
339
341
  end
340
342
  SyncResult.new(changed_items:, deleted_item_paths:, updated_outside_list_window_paths:, is_reset:, token:)
data/lib/token.rb CHANGED
@@ -13,10 +13,12 @@ module StatelyDB
13
13
  # @param [String] token_data
14
14
  # @param [Boolean] can_continue
15
15
  # @param [Boolean] can_sync
16
- def initialize(token_data:, can_continue:, can_sync:)
16
+ # @param [Integer] schema_version_id
17
+ def initialize(token_data:, can_continue:, can_sync:, schema_version_id:)
17
18
  @token_data = token_data
18
19
  @can_continue = can_continue
19
20
  @can_sync = can_sync
21
+ @schema_version_id = schema_version_id
20
22
  end
21
23
 
22
24
  # Returns true if the list operation can be continued, otherwise false.
@@ -30,5 +32,10 @@ module StatelyDB
30
32
  def can_sync?
31
33
  !!@can_sync
32
34
  end
35
+
36
+ # Returns the schema version ID associated with the token.
37
+ def schema_version_id
38
+ !!@schema_version_id
39
+ end
33
40
  end
34
41
  end
@@ -110,7 +110,8 @@ module StatelyDB
110
110
  raw_token = resp.finished.token
111
111
  token = StatelyDB::Token.new(token_data: raw_token.token_data,
112
112
  can_continue: raw_token.can_continue,
113
- can_sync: raw_token.can_sync)
113
+ can_sync: raw_token.can_sync,
114
+ schema_version_id: raw_token.schema_version_id)
114
115
  break
115
116
  end
116
117
  yield resp
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statelydb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stately Cloud, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-19 00:00:00.000000000 Z
11
+ date: 2024-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async