statelydb 0.23.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/api/db/put_pb.rb +1 -1
- data/lib/api/db/transaction_pb.rb +1 -1
- data/lib/statelydb.rb +8 -0
- data/lib/transaction/transaction.rb +1 -0
- data/rbi/db/put_pb.rbi +28 -2
- data/rbi/db/transaction_pb.rbi +28 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b04c96f6fe3528b4be74067b74cb9a7f2305e6ff51a32d4a906b2a8ae5689c4e
|
4
|
+
data.tar.gz: 186c527fbaa091d2e5dfad88ffac574ced06e3ec9f5f0934cf5c3a39f599af21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a537222b409e8a036b62622b391a7bdcb785cbe701094750e563dedd9997d692c0ec5f384f0b1fe220f194ec36d03faab3e64e3cae860439cc0e427fd572f7c
|
7
|
+
data.tar.gz: 29703559309292112f1335d28d53115677151125d227924faa11fef07d19a989a2772d07dc948fe3a8b044ed1d8e32238dace5fdc08df370b9046e8a91b7f3c3
|
data/lib/api/db/put_pb.rb
CHANGED
@@ -7,7 +7,7 @@ require 'google/protobuf'
|
|
7
7
|
require 'api/db/item_pb'
|
8
8
|
|
9
9
|
|
10
|
-
descriptor_data = "\n\x0c\x64\x62/put.proto\x12\nstately.db\x1a\rdb/item.proto\"
|
10
|
+
descriptor_data = "\n\x0c\x64\x62/put.proto\x12\nstately.db\x1a\rdb/item.proto\"\x99\x01\n\nPutRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12\'\n\x04puts\x18\x02 \x03(\x0b\x32\x13.stately.db.PutItemR\x04puts\x12*\n\x11schema_version_id\x18\x03 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x04 \x01(\x04R\x08schemaId\"\x99\x01\n\x07PutItem\x12$\n\x04item\x18\x01 \x01(\x0b\x32\x10.stately.db.ItemR\x04item\x12\x42\n\x1doverwrite_metadata_timestamps\x18\x02 \x01(\x08R\x1boverwriteMetadataTimestamps\x12$\n\x0emust_not_exist\x18\x03 \x01(\x08R\x0cmustNotExist\"5\n\x0bPutResponse\x12&\n\x05items\x18\x01 \x03(\x0b\x32\x10.stately.db.ItemR\x05itemsBc\n\x0e\x63om.stately.dbB\x08PutProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
11
11
|
|
12
12
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
13
|
pool.add_serialized_file(descriptor_data)
|
@@ -14,7 +14,7 @@ require 'api/db/put_pb'
|
|
14
14
|
require 'google/protobuf/empty_pb'
|
15
15
|
|
16
16
|
|
17
|
-
descriptor_data = "\n\x14\x64\x62/transaction.proto\x12\nstately.db\x1a\x16\x64\x62/continue_list.proto\x1a\x0f\x64\x62/delete.proto\x1a\x0c\x64\x62/get.proto\x1a\rdb/item.proto\x1a\x16\x64\x62/item_property.proto\x1a\rdb/list.proto\x1a\x0c\x64\x62/put.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9f\x04\n\x12TransactionRequest\x12\x1d\n\nmessage_id\x18\x01 \x01(\rR\tmessageId\x12\x34\n\x05\x62\x65gin\x18\x02 \x01(\x0b\x32\x1c.stately.db.TransactionBeginH\x00R\x05\x62\x65gin\x12\x39\n\tget_items\x18\x03 \x01(\x0b\x32\x1a.stately.db.TransactionGetH\x00R\x08getItems\x12\x41\n\nbegin_list\x18\x04 \x01(\x0b\x32 .stately.db.TransactionBeginListH\x00R\tbeginList\x12J\n\rcontinue_list\x18\x05 \x01(\x0b\x32#.stately.db.TransactionContinueListH\x00R\x0c\x63ontinueList\x12\x39\n\tput_items\x18\x06 \x01(\x0b\x32\x1a.stately.db.TransactionPutH\x00R\x08putItems\x12\x42\n\x0c\x64\x65lete_items\x18\x07 \x01(\x0b\x32\x1d.stately.db.TransactionDeleteH\x00R\x0b\x64\x65leteItems\x12\x30\n\x06\x63ommit\x18\x08 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x06\x63ommit\x12.\n\x05\x61\x62ort\x18\t \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x05\x61\x62ortB\t\n\x07\x63ommand\"\xc8\x02\n\x13TransactionResponse\x12\x1d\n\nmessage_id\x18\x01 \x01(\rR\tmessageId\x12\x45\n\x0bget_results\x18\x02 \x01(\x0b\x32\".stately.db.TransactionGetResponseH\x00R\ngetResults\x12\x38\n\x07put_ack\x18\x03 \x01(\x0b\x32\x1d.stately.db.TransactionPutAckH\x00R\x06putAck\x12H\n\x0clist_results\x18\x04 \x01(\x0b\x32#.stately.db.TransactionListResponseH\x00R\x0blistResults\x12=\n\x08\x66inished\x18\x05 \x01(\x0b\x32\x1f.stately.db.TransactionFinishedH\x00R\x08\x66inishedB\x08\n\x06result\"
|
17
|
+
descriptor_data = "\n\x14\x64\x62/transaction.proto\x12\nstately.db\x1a\x16\x64\x62/continue_list.proto\x1a\x0f\x64\x62/delete.proto\x1a\x0c\x64\x62/get.proto\x1a\rdb/item.proto\x1a\x16\x64\x62/item_property.proto\x1a\rdb/list.proto\x1a\x0c\x64\x62/put.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x9f\x04\n\x12TransactionRequest\x12\x1d\n\nmessage_id\x18\x01 \x01(\rR\tmessageId\x12\x34\n\x05\x62\x65gin\x18\x02 \x01(\x0b\x32\x1c.stately.db.TransactionBeginH\x00R\x05\x62\x65gin\x12\x39\n\tget_items\x18\x03 \x01(\x0b\x32\x1a.stately.db.TransactionGetH\x00R\x08getItems\x12\x41\n\nbegin_list\x18\x04 \x01(\x0b\x32 .stately.db.TransactionBeginListH\x00R\tbeginList\x12J\n\rcontinue_list\x18\x05 \x01(\x0b\x32#.stately.db.TransactionContinueListH\x00R\x0c\x63ontinueList\x12\x39\n\tput_items\x18\x06 \x01(\x0b\x32\x1a.stately.db.TransactionPutH\x00R\x08putItems\x12\x42\n\x0c\x64\x65lete_items\x18\x07 \x01(\x0b\x32\x1d.stately.db.TransactionDeleteH\x00R\x0b\x64\x65leteItems\x12\x30\n\x06\x63ommit\x18\x08 \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x06\x63ommit\x12.\n\x05\x61\x62ort\x18\t \x01(\x0b\x32\x16.google.protobuf.EmptyH\x00R\x05\x61\x62ortB\t\n\x07\x63ommand\"\xc8\x02\n\x13TransactionResponse\x12\x1d\n\nmessage_id\x18\x01 \x01(\rR\tmessageId\x12\x45\n\x0bget_results\x18\x02 \x01(\x0b\x32\".stately.db.TransactionGetResponseH\x00R\ngetResults\x12\x38\n\x07put_ack\x18\x03 \x01(\x0b\x32\x1d.stately.db.TransactionPutAckH\x00R\x06putAck\x12H\n\x0clist_results\x18\x04 \x01(\x0b\x32#.stately.db.TransactionListResponseH\x00R\x0blistResults\x12=\n\x08\x66inished\x18\x05 \x01(\x0b\x32\x1f.stately.db.TransactionFinishedH\x00R\x08\x66inishedB\x08\n\x06result\"v\n\x10TransactionBegin\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12*\n\x11schema_version_id\x18\x02 \x01(\rR\x0fschemaVersionId\x12\x1b\n\tschema_id\x18\x03 \x01(\x04R\x08schemaId\"9\n\x0eTransactionGet\x12\'\n\x04gets\x18\x01 \x03(\x0b\x32\x13.stately.db.GetItemR\x04gets\"\xd9\x01\n\x14TransactionBeginList\x12&\n\x0fkey_path_prefix\x18\x01 \x01(\tR\rkeyPathPrefix\x12\x14\n\x05limit\x18\x02 \x01(\rR\x05limit\x12\x41\n\rsort_property\x18\x03 \x01(\x0e\x32\x1c.stately.db.SortablePropertyR\x0csortProperty\x12@\n\x0esort_direction\x18\x04 \x01(\x0e\x32\x19.stately.db.SortDirectionR\rsortDirection\"y\n\x17TransactionContinueList\x12\x1d\n\ntoken_data\x18\x01 \x01(\x0cR\ttokenData\x12?\n\tdirection\x18\x04 \x01(\x0e\x32!.stately.db.ContinueListDirectionR\tdirection\"9\n\x0eTransactionPut\x12\'\n\x04puts\x18\x01 \x03(\x0b\x32\x13.stately.db.PutItemR\x04puts\"E\n\x11TransactionDelete\x12\x30\n\x07\x64\x65letes\x18\x01 \x03(\x0b\x32\x16.stately.db.DeleteItemR\x07\x64\x65letes\"@\n\x16TransactionGetResponse\x12&\n\x05items\x18\x01 \x03(\x0b\x32\x10.stately.db.ItemR\x05items\"D\n\x0bGeneratedID\x12\x14\n\x04uint\x18\x01 \x01(\x04H\x00R\x04uint\x12\x16\n\x05\x62ytes\x18\x02 \x01(\x0cH\x00R\x05\x62ytesB\x07\n\x05value\"Q\n\x11TransactionPutAck\x12<\n\rgenerated_ids\x18\x01 \x03(\x0b\x32\x17.stately.db.GeneratedIDR\x0cgeneratedIds\"\x96\x01\n\x17TransactionListResponse\x12\x37\n\x06result\x18\x01 \x01(\x0b\x32\x1d.stately.db.ListPartialResultH\x00R\x06result\x12\x36\n\x08\x66inished\x18\x02 \x01(\x0b\x32\x18.stately.db.ListFinishedH\x00R\x08\x66inishedB\n\n\x08response\"\xa7\x01\n\x13TransactionFinished\x12\x1c\n\tcommitted\x18\x01 \x01(\x08R\tcommitted\x12\x31\n\x0bput_results\x18\x02 \x03(\x0b\x32\x10.stately.db.ItemR\nputResults\x12?\n\x0e\x64\x65lete_results\x18\x03 \x03(\x0b\x32\x18.stately.db.DeleteResultR\rdeleteResultsBk\n\x0e\x63om.stately.dbB\x10TransactionProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
18
18
|
|
19
19
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
20
20
|
pool.add_serialized_file(descriptor_data)
|
data/lib/statelydb.rb
CHANGED
@@ -107,6 +107,7 @@ module StatelyDB
|
|
107
107
|
key_paths = Array(key_paths).flatten
|
108
108
|
req = Stately::Db::GetRequest.new(
|
109
109
|
store_id: @store_id,
|
110
|
+
schema_id: @schema::SCHEMA_ID,
|
110
111
|
schema_version_id: @schema::SCHEMA_VERSION_ID,
|
111
112
|
gets:
|
112
113
|
key_paths.map { |key_path| Stately::Db::GetItem.new(key_path: String(key_path)) },
|
@@ -142,6 +143,7 @@ module StatelyDB
|
|
142
143
|
sort_property:,
|
143
144
|
sort_direction:,
|
144
145
|
allow_stale: @allow_stale,
|
146
|
+
schema_id: @schema::SCHEMA_ID,
|
145
147
|
schema_version_id: @schema::SCHEMA_VERSION_ID
|
146
148
|
)
|
147
149
|
resp = @stub.begin_list(req)
|
@@ -159,6 +161,7 @@ module StatelyDB
|
|
159
161
|
def continue_list(token)
|
160
162
|
req = Stately::Db::ContinueListRequest.new(
|
161
163
|
token_data: token.token_data,
|
164
|
+
schema_id: @schema::SCHEMA_ID,
|
162
165
|
schema_version_id: @schema::SCHEMA_VERSION_ID
|
163
166
|
)
|
164
167
|
resp = @stub.continue_list(req)
|
@@ -202,6 +205,7 @@ module StatelyDB
|
|
202
205
|
filter_condition: item_types.map do |item_type|
|
203
206
|
Stately::Db::FilterCondition.new(item_type: item_type.respond_to?(:name) ? item_type.name.split("::").last : item_type)
|
204
207
|
end,
|
208
|
+
schema_id: @schema::SCHEMA_ID,
|
205
209
|
schema_version_id: @schema::SCHEMA_VERSION_ID
|
206
210
|
)
|
207
211
|
resp = @stub.begin_scan(req)
|
@@ -222,6 +226,7 @@ module StatelyDB
|
|
222
226
|
def continue_scan(token)
|
223
227
|
req = Stately::Db::ContinueScanRequest.new(
|
224
228
|
token_data: token.token_data,
|
229
|
+
schema_id: @schema::SCHEMA_ID,
|
225
230
|
schema_version_id: @schema::SCHEMA_VERSION_ID
|
226
231
|
)
|
227
232
|
resp = @stub.continue_scan(req)
|
@@ -239,6 +244,7 @@ module StatelyDB
|
|
239
244
|
def sync_list(token)
|
240
245
|
req = Stately::Db::SyncListRequest.new(
|
241
246
|
token_data: token.token_data,
|
247
|
+
schema_id: @schema::SCHEMA_ID,
|
242
248
|
schema_version_id: @schema::SCHEMA_VERSION_ID
|
243
249
|
)
|
244
250
|
resp = @stub.sync_list(req)
|
@@ -301,6 +307,7 @@ module StatelyDB
|
|
301
307
|
end
|
302
308
|
req = Stately::Db::PutRequest.new(
|
303
309
|
store_id: @store_id,
|
310
|
+
schema_id: @schema::SCHEMA_ID,
|
304
311
|
schema_version_id: @schema::SCHEMA_VERSION_ID,
|
305
312
|
puts:
|
306
313
|
)
|
@@ -324,6 +331,7 @@ module StatelyDB
|
|
324
331
|
key_paths = Array(key_paths).flatten
|
325
332
|
req = Stately::Db::DeleteRequest.new(
|
326
333
|
store_id: @store_id,
|
334
|
+
schema_id: @schema::SCHEMA_ID,
|
327
335
|
schema_version_id: @schema::SCHEMA_VERSION_ID,
|
328
336
|
deletes: key_paths.map { |key_path| Stately::Db::DeleteItem.new(key_path: String(key_path)) }
|
329
337
|
)
|
@@ -127,6 +127,7 @@ module StatelyDB
|
|
127
127
|
@is_transaction_open = true
|
128
128
|
req = Stately::Db::TransactionRequest.new(
|
129
129
|
begin: Stately::Db::TransactionBegin.new(store_id: @store_id.to_i,
|
130
|
+
schema_id: @schema::SCHEMA_ID,
|
130
131
|
schema_version_id: @schema::SCHEMA_VERSION_ID)
|
131
132
|
)
|
132
133
|
request_only(req)
|
data/rbi/db/put_pb.rbi
CHANGED
@@ -10,13 +10,15 @@ class Stately::Db::PutRequest
|
|
10
10
|
params(
|
11
11
|
store_id: T.nilable(Integer),
|
12
12
|
puts: T.nilable(T::Array[T.nilable(Stately::Db::PutItem)]),
|
13
|
-
schema_version_id: T.nilable(Integer)
|
13
|
+
schema_version_id: T.nilable(Integer),
|
14
|
+
schema_id: T.nilable(Integer)
|
14
15
|
).void
|
15
16
|
end
|
16
17
|
def initialize(
|
17
18
|
store_id: 0,
|
18
19
|
puts: [],
|
19
|
-
schema_version_id: 0
|
20
|
+
schema_version_id: 0,
|
21
|
+
schema_id: 0
|
20
22
|
)
|
21
23
|
end
|
22
24
|
|
@@ -83,6 +85,30 @@ class Stately::Db::PutRequest
|
|
83
85
|
def clear_schema_version_id
|
84
86
|
end
|
85
87
|
|
88
|
+
# schema_id refers to the schema to use for this operation.
|
89
|
+
# If the store_id does not have a schema with this ID, the operation will
|
90
|
+
# error with SchemaNotFound error. You should not have to set this manually
|
91
|
+
# as your generated SDK should know its schema and wire this in for you.
|
92
|
+
sig { returns(Integer) }
|
93
|
+
def schema_id
|
94
|
+
end
|
95
|
+
|
96
|
+
# schema_id refers to the schema to use for this operation.
|
97
|
+
# If the store_id does not have a schema with this ID, the operation will
|
98
|
+
# error with SchemaNotFound error. You should not have to set this manually
|
99
|
+
# as your generated SDK should know its schema and wire this in for you.
|
100
|
+
sig { params(value: Integer).void }
|
101
|
+
def schema_id=(value)
|
102
|
+
end
|
103
|
+
|
104
|
+
# schema_id refers to the schema to use for this operation.
|
105
|
+
# If the store_id does not have a schema with this ID, the operation will
|
106
|
+
# error with SchemaNotFound error. You should not have to set this manually
|
107
|
+
# as your generated SDK should know its schema and wire this in for you.
|
108
|
+
sig { void }
|
109
|
+
def clear_schema_id
|
110
|
+
end
|
111
|
+
|
86
112
|
sig { params(field: String).returns(T.untyped) }
|
87
113
|
def [](field)
|
88
114
|
end
|
data/rbi/db/transaction_pb.rbi
CHANGED
@@ -421,12 +421,14 @@ class Stately::Db::TransactionBegin
|
|
421
421
|
sig do
|
422
422
|
params(
|
423
423
|
store_id: T.nilable(Integer),
|
424
|
-
schema_version_id: T.nilable(Integer)
|
424
|
+
schema_version_id: T.nilable(Integer),
|
425
|
+
schema_id: T.nilable(Integer)
|
425
426
|
).void
|
426
427
|
end
|
427
428
|
def initialize(
|
428
429
|
store_id: 0,
|
429
|
-
schema_version_id: 0
|
430
|
+
schema_version_id: 0,
|
431
|
+
schema_id: 0
|
430
432
|
)
|
431
433
|
end
|
432
434
|
|
@@ -484,6 +486,30 @@ class Stately::Db::TransactionBegin
|
|
484
486
|
def clear_schema_version_id
|
485
487
|
end
|
486
488
|
|
489
|
+
# schema_id refers to the schema to use for this operation.
|
490
|
+
# If the store_id does not have a schema with this ID, the operation will
|
491
|
+
# error with SchemaNotFound error. You should not have to set this manually
|
492
|
+
# as your generated SDK should know its schema and wire this in for you.
|
493
|
+
sig { returns(Integer) }
|
494
|
+
def schema_id
|
495
|
+
end
|
496
|
+
|
497
|
+
# schema_id refers to the schema to use for this operation.
|
498
|
+
# If the store_id does not have a schema with this ID, the operation will
|
499
|
+
# error with SchemaNotFound error. You should not have to set this manually
|
500
|
+
# as your generated SDK should know its schema and wire this in for you.
|
501
|
+
sig { params(value: Integer).void }
|
502
|
+
def schema_id=(value)
|
503
|
+
end
|
504
|
+
|
505
|
+
# schema_id refers to the schema to use for this operation.
|
506
|
+
# If the store_id does not have a schema with this ID, the operation will
|
507
|
+
# error with SchemaNotFound error. You should not have to set this manually
|
508
|
+
# as your generated SDK should know its schema and wire this in for you.
|
509
|
+
sig { void }
|
510
|
+
def clear_schema_id
|
511
|
+
end
|
512
|
+
|
487
513
|
sig { params(field: String).returns(T.untyped) }
|
488
514
|
def [](field)
|
489
515
|
end
|
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.
|
4
|
+
version: 0.25.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: 2025-03-
|
11
|
+
date: 2025-03-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|