From 493aca1ae2efc97b610097fca7963a314ab3fe77 Mon Sep 17 00:00:00 2001 From: Michael Brackx Date: Tue, 10 Sep 2013 12:25:49 +0200 Subject: [PATCH] Add missing type converter for counters --- lib/cql/protocol/type_converter.rb | 1 + spec/cql/protocol/type_converter_spec.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cql/protocol/type_converter.rb b/lib/cql/protocol/type_converter.rb index 37e44be..11e424b 100644 --- a/lib/cql/protocol/type_converter.rb +++ b/lib/cql/protocol/type_converter.rb @@ -108,6 +108,7 @@ def to_bytes_converters :bigint => method(:bigint_to_bytes), :blob => method(:blob_to_bytes), :boolean => method(:boolean_to_bytes), + :counter => method(:bigint_to_bytes), :decimal => method(:decimal_to_bytes), :double => method(:double_to_bytes), :float => method(:float_to_bytes), diff --git a/spec/cql/protocol/type_converter_spec.rb b/spec/cql/protocol/type_converter_spec.rb index e5d1274..251076b 100644 --- a/spec/cql/protocol/type_converter_spec.rb +++ b/spec/cql/protocol/type_converter_spec.rb @@ -14,7 +14,7 @@ module Protocol '' end - TYPES = [:ascii, :bigint, :blob, :boolean, :decimal, :double, :float, :inet, :int, :text, :varchar, :timestamp, :timeuuid, :uuid, :varint].freeze + TYPES = [:ascii, :bigint, :blob, :boolean, :counter, :decimal, :double, :float, :inet, :int, :text, :varchar, :timestamp, :timeuuid, :uuid, :varint].freeze describe '#to_bytes' do context 'when encoding normal value' do