uc3-dmp-dynamo 0.0.15 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-dynamo/client.rb +3 -3
- data/lib/uc3-dmp-dynamo/version.rb +1 -1
- 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: ca5daa145632200988f0242ca7e0b29070d5fe2b46b7effbc6a2ea4a36e18640
|
4
|
+
data.tar.gz: b1f2b014ab8cc9961857efe5ff6591cd08ca7280e503f11ed1dad35002680dd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 490968b1521f64a06aa4ee43b083fcaaf655c23e207f4f3c1674d8edf3fad3cc94edd726c9b12785318b944002e486b0851dd44b09ce61857e03d4c3da7d174b
|
7
|
+
data.tar.gz: c2dfe6bce32b210f582c22425222d141c57679f0c5de338767eb69132da1db329650d97cecdfba3e63d4044cb230adc8ffc5814d608e9ecfeec39367218e041b
|
@@ -21,10 +21,10 @@ module Uc3DmpDynamo
|
|
21
21
|
end
|
22
22
|
|
23
23
|
# Quick get_item that only returns the PK to validate that the item exists
|
24
|
-
def pk_exists?(key:)
|
24
|
+
def pk_exists?(key:, logger: nil)
|
25
25
|
return nil unless key.is_a?(Hash) && !key['PK'].nil?
|
26
26
|
|
27
|
-
resp = client.get_item(table_name: @table, key: key, projection_expression: 'PK')
|
27
|
+
resp = client.get_item(table_name: @table, key: key, projection_expression: 'PK', logger: logger)
|
28
28
|
resp.item.is_a?(Hash) && resp.item['PK'] == key['PK']
|
29
29
|
end
|
30
30
|
|
@@ -64,7 +64,7 @@ module Uc3DmpDynamo
|
|
64
64
|
return_consumed_capacity: logger&.level == 'debug' ? 'TOTAL' : 'NONE'
|
65
65
|
}
|
66
66
|
# Look for and add any other filtering or projection args
|
67
|
-
%i[filter_expression expression_attribute_values projection_expression scan_index_forward].each do |key|
|
67
|
+
%i[index_name filter_expression expression_attribute_values projection_expression scan_index_forward].each do |key|
|
68
68
|
next if args[key.to_sym].nil?
|
69
69
|
|
70
70
|
hash[key.to_sym] = args[key.to_sym]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uc3-dmp-dynamo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|