Add OrderedMapSerializedKey to cql encoder mapping

This is to correctly encode values that are originally returned from a
query.
This commit is contained in:
Adam Holmberg
2015-04-16 09:23:45 -05:00
parent a0482216e8
commit 3ab95f0adf

View File

@@ -28,7 +28,8 @@ import types
from uuid import UUID from uuid import UUID
import six import six
from cassandra.util import OrderedDict, OrderedMap, sortedset, Time from cassandra.util import (OrderedDict, OrderedMap, OrderedMapSerializedKey,
sortedset, Time)
if six.PY3: if six.PY3:
long = int long = int
@@ -79,6 +80,7 @@ class Encoder(object):
dict: self.cql_encode_map_collection, dict: self.cql_encode_map_collection,
OrderedDict: self.cql_encode_map_collection, OrderedDict: self.cql_encode_map_collection,
OrderedMap: self.cql_encode_map_collection, OrderedMap: self.cql_encode_map_collection,
OrderedMapSerializedKey: self.cql_encode_map_collection,
list: self.cql_encode_list_collection, list: self.cql_encode_list_collection,
tuple: self.cql_encode_list_collection, tuple: self.cql_encode_list_collection,
set: self.cql_encode_set_collection, set: self.cql_encode_set_collection,