sessionm-cassandra_object 4.0.16 → 4.0.17
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed329a15a831823620ffa071ce312de25c3f375f
|
4
|
+
data.tar.gz: 6f818bc4fc78a4431ee347cb02744381079e4164
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0e93509823634b57f7933c30c6b37e4dab27663bb484dfafadf23f80a329b56805f34e9cfd2ee101b4d24cdfe2c5bc1f6d6250834921d1a429a289b92bb123b
|
7
|
+
data.tar.gz: 48c59e303a94544bc5e668cca4377fdc78e30472a202afb2a02ada6411f4bc6e3f74d10591ac2d279d1da3317669dddc798a8d931d16af017fb68149f6624556
|
@@ -127,7 +127,19 @@ module CassandraObject
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def get_columns_as_hash(column_family, key, columns, opts)
|
130
|
-
|
130
|
+
async = opts.try(:[], :async)
|
131
|
+
|
132
|
+
key = "textAsBlob('#{key}')"
|
133
|
+
|
134
|
+
name_fields = columns.map { |c| "'#{c}'" }.join(', ')
|
135
|
+
|
136
|
+
query = "SELECT #{NAME_FIELD}, #{VALUE_FIELD} FROM \"#{column_family}\" WHERE #{NAME_FIELD} IN(#{name_fields}) AND #{KEY_FIELD} = #{key}"
|
137
|
+
|
138
|
+
result = async ? self.execute_async(query, execute_options(opts)) : self.execute(query, execute_options(opts))
|
139
|
+
return result if async
|
140
|
+
|
141
|
+
result
|
142
|
+
.inject({}) { |hsh, row| hsh[row[NAME_FIELD]] = row[VALUE_FIELD]; hsh }
|
131
143
|
end
|
132
144
|
|
133
145
|
def get_value(column_family, key, column, consistency)
|