
The root of the problem was that nested data types would use the default encoders for subitems. When the encoders were customized, they would not be used for those nested items. This fix moves the encoder functions into a class so that collections, tuples, and UDTs will use the customized mapping when encoding subitems. Fixes PYTHON-100.
1.4 KiB
1.4 KiB
cassandra.query
- Prepared Statements, Batch Statements, Tracing, and Row Factories
cassandra.query
tuple_factory
named_tuple_factory
dict_factory
ordered_dict_factory
Statement
SimpleStatement
PreparedStatement ()
BoundStatement
BatchStatement (batch_type=BatchType.LOGGED, retry_policy=None, consistency_level=None)
BatchType ()
LOGGED
UNLOGGED
COUNTER
cassandra.query.ValueSequence
A wrapper class that is used to specify that a sequence of values
should be treated as a CQL list of values instead of a single column
collection when used as part of the parameters argument for .Session.execute()
.
This is typically needed when supplying a list of keys to select. For example:
>>> my_user_ids = ('alice', 'bob', 'charles')
>>> query = "SELECT * FROM users WHERE user_id IN %s"
>>> session.execute(query, parameters=[ValueSequence(my_user_ids)])
QueryTrace ()
TraceEvent ()
TraceUnavailable