MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / bind_params

Function bind_params

cassandra/query.py:855–859  ·  view source on GitHub ↗
(query, params, encoder)

Source from the content-addressed store, hash-verified

853
854
855def bind_params(query, params, encoder):
856 if isinstance(params, dict):
857 return query % dict((k, encoder.cql_encode_all_types(v)) for k, v in params.items())
858 else:
859 return query % tuple(encoder.cql_encode_all_types(v) for v in params)
860
861
862class TraceUnavailable(Exception):

Callers 15

test_bind_sequenceMethod · 0.90
test_bind_mapMethod · 0.90
test_sequence_paramMethod · 0.90
test_generator_paramMethod · 0.90
test_none_paramMethod · 0.90
test_list_collectionMethod · 0.90
test_set_collectionMethod · 0.90
test_map_collectionMethod · 0.90
test_quote_escapingMethod · 0.90
test_float_precisionMethod · 0.90
get_tableMethod · 0.90

Calls 2

cql_encode_all_typesMethod · 0.80
itemsMethod · 0.45

Tested by 10

test_bind_sequenceMethod · 0.72
test_bind_mapMethod · 0.72
test_sequence_paramMethod · 0.72
test_generator_paramMethod · 0.72
test_none_paramMethod · 0.72
test_list_collectionMethod · 0.72
test_set_collectionMethod · 0.72
test_map_collectionMethod · 0.72
test_quote_escapingMethod · 0.72
test_float_precisionMethod · 0.72