lib/adapter/cassanity.rb in adapter-cassanity-0.2.0 vs lib/adapter/cassanity.rb in adapter-cassanity-0.3.0
- old
+ new
@@ -13,16 +13,16 @@
operation_options = {where: where(key)}
adapter_options = @options[:read]
arguments = update_arguments(operation_options, adapter_options, options)
rows = @client.select(arguments)
- rows.empty? ? nil : decode(rows.first)
+ rows.empty? ? nil : rows.first
end
# Public
def write(key, attributes, options = nil)
- operation_options = {set: encode(attributes), where: where(key)}
+ operation_options = {set: attributes, where: where(key)}
adapter_options = @options[:write]
arguments = update_arguments(operation_options, adapter_options, options)
@client.update(arguments)
end
@@ -35,10 +35,10 @@
@client.delete(arguments)
end
# Public
- def clear
+ def clear(options = nil)
@client.truncate
end
# Private
def where(criteria)