statelydb 0.17.0 → 0.18.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/continue_scan_pb.rb +17 -0
- data/lib/api/db/scan_pb.rb +19 -0
- data/lib/api/db/service_pb.rb +3 -1
- data/lib/api/db/service_services_pb.rb +18 -0
- data/lib/common/net/conn.rb +5 -4
- data/lib/stately_codes.rb +12 -0
- data/sig/statelydb.rbi +5 -0
- data/sig/statelydb.rbs +5 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d483a4f27e6db0ab8cf105436628e289d4a052165f52255bc27d75f7e7f3a732
|
4
|
+
data.tar.gz: 594c97893a48d797d1bda478745aca8c3d4d7df75d14893c5c7dd806ae4916b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c8e520f46d720316d90c58f9737d16c5527631ebaebbbe1181bf2b9e75cd1f100fcfe69cf78c8df46c41298cb791f0ba60f1b58c425a49289c8453ca01f119d
|
7
|
+
data.tar.gz: 7b655f365beffac08bfe29ecff25962c80794becb1788509380d893f0fc29078c4c97f00d2cff8aed75a870d1167a7a36dd9ea8ec3c5ad166fa0387f85fb387f
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: db/continue_scan.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
|
8
|
+
descriptor_data = "\n\x16\x64\x62/continue_scan.proto\x12\nstately.db\"`\n\x13\x43ontinueScanRequest\x12\x1d\n\ntoken_data\x18\x01 \x01(\x0cR\ttokenData\x12*\n\x11schema_version_id\x18\x02 \x01(\rR\x0fschemaVersionIdBl\n\x0e\x63om.stately.dbB\x11\x43ontinueScanProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
12
|
+
|
13
|
+
module Stately
|
14
|
+
module Db
|
15
|
+
ContinueScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ContinueScanRequest").msgclass
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: db/scan.proto
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
|
8
|
+
descriptor_data = "\n\rdb/scan.proto\x12\nstately.db\"9\n\x0f\x46ilterCondition\x12\x1d\n\titem_type\x18\x01 \x01(\tH\x00R\x08itemTypeB\x07\n\x05value\"\x88\x02\n\x10\x42\x65ginScanRequest\x12\x19\n\x08store_id\x18\x01 \x01(\x04R\x07storeId\x12\x46\n\x10\x66ilter_condition\x18\x02 \x03(\x0b\x32\x1b.stately.db.FilterConditionR\x0f\x66ilterCondition\x12\x14\n\x05limit\x18\x03 \x01(\rR\x05limit\x12O\n\x13segmentation_params\x18\x04 \x01(\x0b\x32\x1e.stately.db.SegmentationParamsR\x12segmentationParams\x12*\n\x11schema_version_id\x18\x05 \x01(\rR\x0fschemaVersionId\"`\n\x12SegmentationParams\x12%\n\x0etotal_segments\x18\x05 \x01(\rR\rtotalSegments\x12#\n\rsegment_index\x18\x06 \x01(\rR\x0csegmentIndexBd\n\x0e\x63om.stately.dbB\tScanProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
9
|
+
|
10
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
11
|
+
pool.add_serialized_file(descriptor_data)
|
12
|
+
|
13
|
+
module Stately
|
14
|
+
module Db
|
15
|
+
FilterCondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.FilterCondition").msgclass
|
16
|
+
BeginScanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.BeginScanRequest").msgclass
|
17
|
+
SegmentationParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.SegmentationParams").msgclass
|
18
|
+
end
|
19
|
+
end
|
data/lib/api/db/service_pb.rb
CHANGED
@@ -5,16 +5,18 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
require 'api/db/continue_list_pb'
|
8
|
+
require 'api/db/continue_scan_pb'
|
8
9
|
require 'api/db/delete_pb'
|
9
10
|
require 'api/db/get_pb'
|
10
11
|
require 'api/db/list_pb'
|
11
12
|
require 'api/db/put_pb'
|
13
|
+
require 'api/db/scan_pb'
|
12
14
|
require 'api/db/scan_root_paths_pb'
|
13
15
|
require 'api/db/sync_list_pb'
|
14
16
|
require 'api/db/transaction_pb'
|
15
17
|
|
16
18
|
|
17
|
-
descriptor_data = "\n\x10\x64\x62/service.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/list.proto\x1a\x0c\x64\x62/put.proto\x1a\x18\x64\x62/scan_root_paths.proto\x1a\x12\x64\x62/sync_list.proto\x1a\x14\x64\x62/transaction.proto2\
|
19
|
+
descriptor_data = "\n\x10\x64\x62/service.proto\x12\nstately.db\x1a\x16\x64\x62/continue_list.proto\x1a\x16\x64\x62/continue_scan.proto\x1a\x0f\x64\x62/delete.proto\x1a\x0c\x64\x62/get.proto\x1a\rdb/list.proto\x1a\x0c\x64\x62/put.proto\x1a\rdb/scan.proto\x1a\x18\x64\x62/scan_root_paths.proto\x1a\x12\x64\x62/sync_list.proto\x1a\x14\x64\x62/transaction.proto2\x8c\x06\n\x0f\x44\x61tabaseService\x12;\n\x03Put\x12\x16.stately.db.PutRequest\x1a\x17.stately.db.PutResponse\"\x03\x90\x02\x02\x12;\n\x03Get\x12\x16.stately.db.GetRequest\x1a\x17.stately.db.GetResponse\"\x03\x90\x02\x01\x12\x44\n\x06\x44\x65lete\x12\x19.stately.db.DeleteRequest\x1a\x1a.stately.db.DeleteResponse\"\x03\x90\x02\x02\x12J\n\tBeginList\x12\x1c.stately.db.BeginListRequest\x1a\x18.stately.db.ListResponse\"\x03\x90\x02\x01\x30\x01\x12P\n\x0c\x43ontinueList\x12\x1f.stately.db.ContinueListRequest\x1a\x18.stately.db.ListResponse\"\x03\x90\x02\x01\x30\x01\x12J\n\tBeginScan\x12\x1c.stately.db.BeginScanRequest\x1a\x18.stately.db.ListResponse\"\x03\x90\x02\x01\x30\x01\x12P\n\x0c\x43ontinueScan\x12\x1f.stately.db.ContinueScanRequest\x1a\x18.stately.db.ListResponse\"\x03\x90\x02\x01\x30\x01\x12L\n\x08SyncList\x12\x1b.stately.db.SyncListRequest\x1a\x1c.stately.db.SyncListResponse\"\x03\x90\x02\x01\x30\x01\x12T\n\x0bTransaction\x12\x1e.stately.db.TransactionRequest\x1a\x1f.stately.db.TransactionResponse\"\x00(\x01\x30\x01\x12Y\n\rScanRootPaths\x12 .stately.db.ScanRootPathsRequest\x1a!.stately.db.ScanRootPathsResponse\"\x03\x90\x02\x01\x42g\n\x0e\x63om.stately.dbB\x0cServiceProtoP\x01\xa2\x02\x03SDX\xaa\x02\nStately.Db\xca\x02\nStately\\Db\xe2\x02\x16Stately\\Db\\GPBMetadata\xea\x02\x0bStately::Dbb\x06proto3"
|
18
20
|
|
19
21
|
pool = Google::Protobuf::DescriptorPool.generated_pool
|
20
22
|
pool.add_serialized_file(descriptor_data)
|
@@ -62,6 +62,24 @@ module Stately
|
|
62
62
|
# ContinueList with its token should also be allowed.
|
63
63
|
# buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
|
64
64
|
rpc :ContinueList, ::Stately::Db::ContinueListRequest, stream(::Stately::Db::ListResponse)
|
65
|
+
# BeginScan initiates a scan request which will scan over the entire store
|
66
|
+
# and apply the provided filters. This API returns a token that you can pass
|
67
|
+
# to ContinueScan to paginate through the result set. This can fail if the
|
68
|
+
# caller does not have permission to read Items.
|
69
|
+
# WARNING: THIS API CAN BE EXTREMELY EXPENSIVE FOR STORES WITH A LARGE NUMBER
|
70
|
+
# OF ITEMS.
|
71
|
+
# buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
|
72
|
+
rpc :BeginScan, ::Stately::Db::BeginScanRequest, stream(::Stately::Db::ListResponse)
|
73
|
+
# ContinueScan takes the token from a BeginScan call and returns more results
|
74
|
+
# based on the original request parameters and pagination options. It has
|
75
|
+
# very few options of its own because it is a continuation of a previous list
|
76
|
+
# operation. It will return a new token which can be used for another
|
77
|
+
# ContinueScan call, and so on. Calls to ContinueScan are tied to the
|
78
|
+
# authorization of the original BeginScan call, so if the original BeginScan
|
79
|
+
# call was allowed, ContinueScan with its token should also be allowed.
|
80
|
+
# WARNING: THIS API CAN BE EXTREMELY EXPENSIVE FOR STORES WITH A LARGE NUMBER OF ITEMS.
|
81
|
+
# buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
|
82
|
+
rpc :ContinueScan, ::Stately::Db::ContinueScanRequest, stream(::Stately::Db::ListResponse)
|
65
83
|
# SyncList returns all changes to Items within the result set of a previous
|
66
84
|
# List operation. For all Items within the result set that were modified, it
|
67
85
|
# returns the full Item at in its current state. It also returns a list of
|
data/lib/common/net/conn.rb
CHANGED
@@ -24,13 +24,14 @@ module StatelyDB
|
|
24
24
|
# Find the full list of supported keys
|
25
25
|
# here: https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
|
26
26
|
|
27
|
-
#
|
28
|
-
#
|
27
|
+
# Can't make it unlimited so set INT32_MAX: ~2GB
|
28
|
+
# https://groups.google.com/g/grpc-io/c/FoLNUJVN4o4
|
29
|
+
# We set max_ and absolute_max_ to the same value
|
29
30
|
# to stop the grpc lib changing the error code to ResourceExhausted
|
30
31
|
# while still successfully reading the metadata because only the soft
|
31
32
|
# limit was exceeded.
|
32
|
-
"grpc.max_metadata_size" =>
|
33
|
-
"grpc.absolute_max_metadata_size" =>
|
33
|
+
"grpc.max_metadata_size" => (2**31) - 1,
|
34
|
+
"grpc.absolute_max_metadata_size" => (2**31) - 1
|
34
35
|
}, creds)
|
35
36
|
end
|
36
37
|
end
|
data/lib/stately_codes.rb
CHANGED
@@ -47,6 +47,18 @@ module StatelyCode
|
|
47
47
|
# unless the conditions for the operation are changed.
|
48
48
|
CONDITIONAL_CHECK_FAILED = "ConditionalCheckFailed"
|
49
49
|
|
50
|
+
# ItemReusedWithDifferentKeyPath occurs when a client reads an Item, then
|
51
|
+
# attempts to write it with a different Key Path. Since writing an Item with
|
52
|
+
# a different Key Path will create a new Item, StatelyDB returns this error
|
53
|
+
# to prevent accidental copying of Items between different Key Paths. If you
|
54
|
+
# intend to move your original Item to a new Key Path, you should delete the
|
55
|
+
# original Item and create a new instance of the Item with the new Key Path.
|
56
|
+
# If you intend to create a new Item with the same data, you should create a
|
57
|
+
# new instance of the Item rather than reusing the read result.
|
58
|
+
#
|
59
|
+
# - Not Retryable
|
60
|
+
ITEM_REUSED_WITH_DIFFERENT_KEY_PATH = "ItemReusedWithDifferentKeyPath"
|
61
|
+
|
50
62
|
# NonRecoverableTransaction indicates that conditions required for the
|
51
63
|
# transaction to succeed are not possible to meet with the current state of
|
52
64
|
# the system. This can occur when an Item has more than one key-path, and is
|
data/sig/statelydb.rbi
CHANGED
@@ -1102,6 +1102,9 @@ module Stately
|
|
1102
1102
|
ListPartialResult = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ListPartialResult").msgclass, T.untyped)
|
1103
1103
|
ListFinished = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ListFinished").msgclass, T.untyped)
|
1104
1104
|
SortDirection = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.SortDirection").enummodule, T.untyped)
|
1105
|
+
FilterCondition = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.FilterCondition").msgclass, T.untyped)
|
1106
|
+
BeginScanRequest = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.BeginScanRequest").msgclass, T.untyped)
|
1107
|
+
SegmentationParams = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.SegmentationParams").msgclass, T.untyped)
|
1105
1108
|
DeleteRequest = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.DeleteRequest").msgclass, T.untyped)
|
1106
1109
|
DeleteItem = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.DeleteItem").msgclass, T.untyped)
|
1107
1110
|
DeleteResult = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.DeleteResult").msgclass, T.untyped)
|
@@ -1127,6 +1130,7 @@ module Stately
|
|
1127
1130
|
TransactionFinished = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.TransactionFinished").msgclass, T.untyped)
|
1128
1131
|
ContinueListRequest = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ContinueListRequest").msgclass, T.untyped)
|
1129
1132
|
ContinueListDirection = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ContinueListDirection").enummodule, T.untyped)
|
1133
|
+
ContinueScanRequest = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ContinueScanRequest").msgclass, T.untyped)
|
1130
1134
|
SortableProperty = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.SortableProperty").enummodule, T.untyped)
|
1131
1135
|
ScanRootPathsRequest = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ScanRootPathsRequest").msgclass, T.untyped)
|
1132
1136
|
ScanRootPathsResponse = T.let(::Google::Protobuf::DescriptorPool.generated_pool.lookup("stately.db.ScanRootPathsResponse").msgclass, T.untyped)
|
@@ -1169,6 +1173,7 @@ module StatelyCode
|
|
1169
1173
|
CACHED_SCHEMA_TOO_OLD = T.let("CachedSchemaTooOld", T.untyped)
|
1170
1174
|
CONCURRENT_MODIFICATION = T.let("ConcurrentModification", T.untyped)
|
1171
1175
|
CONDITIONAL_CHECK_FAILED = T.let("ConditionalCheckFailed", T.untyped)
|
1176
|
+
ITEM_REUSED_WITH_DIFFERENT_KEY_PATH = T.let("ItemReusedWithDifferentKeyPath", T.untyped)
|
1172
1177
|
NON_RECOVERABLE_TRANSACTION = T.let("NonRecoverableTransaction", T.untyped)
|
1173
1178
|
STORE_IN_USE = T.let("StoreInUse", T.untyped)
|
1174
1179
|
STORE_REQUEST_LIMIT_EXCEEDED = T.let("StoreRequestLimitExceeded", T.untyped)
|
data/sig/statelydb.rbs
CHANGED
@@ -956,6 +956,9 @@ module Stately
|
|
956
956
|
ListPartialResult: untyped
|
957
957
|
ListFinished: untyped
|
958
958
|
SortDirection: untyped
|
959
|
+
FilterCondition: untyped
|
960
|
+
BeginScanRequest: untyped
|
961
|
+
SegmentationParams: untyped
|
959
962
|
DeleteRequest: untyped
|
960
963
|
DeleteItem: untyped
|
961
964
|
DeleteResult: untyped
|
@@ -981,6 +984,7 @@ module Stately
|
|
981
984
|
TransactionFinished: untyped
|
982
985
|
ContinueListRequest: untyped
|
983
986
|
ContinueListDirection: untyped
|
987
|
+
ContinueScanRequest: untyped
|
984
988
|
SortableProperty: untyped
|
985
989
|
ScanRootPathsRequest: untyped
|
986
990
|
ScanRootPathsResponse: untyped
|
@@ -1023,6 +1027,7 @@ module StatelyCode
|
|
1023
1027
|
CACHED_SCHEMA_TOO_OLD: untyped
|
1024
1028
|
CONCURRENT_MODIFICATION: untyped
|
1025
1029
|
CONDITIONAL_CHECK_FAILED: untyped
|
1030
|
+
ITEM_REUSED_WITH_DIFFERENT_KEY_PATH: untyped
|
1026
1031
|
NON_RECOVERABLE_TRANSACTION: untyped
|
1027
1032
|
STORE_IN_USE: untyped
|
1028
1033
|
STORE_REQUEST_LIMIT_EXCEEDED: untyped
|
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.18.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-
|
11
|
+
date: 2025-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/api/auth/service_pb.rb
|
79
79
|
- lib/api/auth/service_services_pb.rb
|
80
80
|
- lib/api/db/continue_list_pb.rb
|
81
|
+
- lib/api/db/continue_scan_pb.rb
|
81
82
|
- lib/api/db/delete_pb.rb
|
82
83
|
- lib/api/db/get_pb.rb
|
83
84
|
- lib/api/db/item_pb.rb
|
@@ -85,6 +86,7 @@ files:
|
|
85
86
|
- lib/api/db/list_pb.rb
|
86
87
|
- lib/api/db/list_token_pb.rb
|
87
88
|
- lib/api/db/put_pb.rb
|
89
|
+
- lib/api/db/scan_pb.rb
|
88
90
|
- lib/api/db/scan_root_paths_pb.rb
|
89
91
|
- lib/api/db/service_pb.rb
|
90
92
|
- lib/api/db/service_services_pb.rb
|