datastax/python-driver — pull request #62 by yinyin (2013-12-11 17:16:50+00:00)
Title: add encoder mapping for OrderedDict

OrderedDict is the resulted object type when SELECT-ing map data object.

I got the following exception when use fetched map object (ie: will be a python OrderedDict object) as query arguments.

SyntaxException:

This patch fixes this issue by add a entry in ```cql_encoders``` for OrderedDict

--------

I tested this patch by the following code -

```python
s.execute("CREATE TABLE test_map_table(t_id timeuuid, t_val map, PRIMARY KEY(t_id))")

t_id = uuid.uuid1()
t_val_1 = {'a': 'alpha-1', 'b': 'beta-2', }
s.execute("INSERT INTO test_map_table(t_id, t_val) VALUES(%s, %s)", (t_id, t_val_1,))

result = s.execute("SELECT t_id, t_val FROM test_map_table")
t_val_2 = result[0].t_val

s.execute("UPDATE test_map_table SET t_val=%s WHERE (t_id = %s)", (t_val_2, t_id,))

result = s.execute("SELECT t_id, t_val FROM test_map_table")
self.assertEqual(t_id, result[0].t_id)
self.assertEqual(t_val_2, result[0].t_val)
```