ocean-dynamo 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean-dynamo/persistence.rb +10 -10
- data/lib/ocean-dynamo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04db053777f871fe72fa601141e22c9b0a4d8da3d376bc182107de422b1ff132
|
4
|
+
data.tar.gz: d8e972e907c64451b60832265d89d4d8007bc52c7bfcfcace17f1fd175297dff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee3780dc50d7657a0e4ca4c236cbd5d2503b22a62db570a779b8b2d68f1349c19675f0e204f2596ffa46d9a118151390d914f1c3b539d311bc4dde8997a4d68f
|
7
|
+
data.tar.gz: df5a8f45bb9cde7bf203d0e4e2b12c3033e78e6c7cb92da37a84ffd4dba1ca379ac88c93d39dd96594ffb68cd83fd683e3ed170012a42c6d8115224bd1b2598c
|
@@ -4,7 +4,7 @@ module OceanDynamo
|
|
4
4
|
def self.included(base)
|
5
5
|
base.extend(ClassMethods)
|
6
6
|
end
|
7
|
-
|
7
|
+
|
8
8
|
|
9
9
|
# ---------------------------------------------------------
|
10
10
|
#
|
@@ -38,7 +38,7 @@ module OceanDynamo
|
|
38
38
|
_late_connect?
|
39
39
|
keys = { table_hash_key.to_s => hash }
|
40
40
|
keys[table_range_key] = range if table_range_key && range
|
41
|
-
options = { key: keys,
|
41
|
+
options = { key: keys,
|
42
42
|
return_values: "ALL_OLD"
|
43
43
|
}
|
44
44
|
dynamo_table.delete_item(options).attributes ? true : false
|
@@ -127,7 +127,7 @@ module OceanDynamo
|
|
127
127
|
context ||= (new_record? ? :create : :update)
|
128
128
|
output = super(context)
|
129
129
|
errors.empty? && output
|
130
|
-
end
|
130
|
+
end
|
131
131
|
|
132
132
|
|
133
133
|
def save(options={})
|
@@ -251,7 +251,7 @@ module OceanDynamo
|
|
251
251
|
update_expression << "#{ts} = #{nomen}"
|
252
252
|
end
|
253
253
|
update_expression = "SET " + update_expression.join(", ")
|
254
|
-
options = {
|
254
|
+
options = {
|
255
255
|
key: serialized_key_attributes,
|
256
256
|
update_expression: update_expression
|
257
257
|
}.merge(_handle_locking)
|
@@ -267,11 +267,11 @@ module OceanDynamo
|
|
267
267
|
|
268
268
|
|
269
269
|
#
|
270
|
-
# Deserialises and assigns all defined attributes. Skips undeclared attributes.
|
271
|
-
# Unlike its predecessor, this version never reads anything from DynamoDB,
|
272
|
-
# it just processes the results from such reads. Thus, the implementation of
|
270
|
+
# Deserialises and assigns all defined attributes. Skips undeclared attributes.
|
271
|
+
# Unlike its predecessor, this version never reads anything from DynamoDB,
|
272
|
+
# it just processes the results from such reads. Thus, the implementation of
|
273
273
|
# +consistent+ reads is up to the caller of this method.
|
274
|
-
#
|
274
|
+
#
|
275
275
|
def _setup_from_dynamo(arg)
|
276
276
|
case arg
|
277
277
|
when Aws::DynamoDB::Types::GetItemOutput
|
@@ -450,13 +450,13 @@ module OceanDynamo
|
|
450
450
|
|
451
451
|
|
452
452
|
#
|
453
|
-
# Returns a hash with a condition expression which has to be satisfied
|
453
|
+
# Returns a hash with a condition expression which has to be satisfied
|
454
454
|
# for the write or delete operation to succeed.
|
455
455
|
# Note that this method will increment the lock attribute. This means
|
456
456
|
# two things:
|
457
457
|
# 1. Collect the instance attributes after this method has been called.
|
458
458
|
# 2. Remember that care must be taken to decrement the lock attribute in
|
459
|
-
# case the subsequent write/delete operation fails or throws an
|
459
|
+
# case the subsequent write/delete operation fails or throws an
|
460
460
|
# exception, such as +StaleObjectError+.
|
461
461
|
#
|
462
462
|
def _handle_locking(lock=lock_attribute) # :nodoc:
|
data/lib/ocean-dynamo/version.rb
CHANGED