MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / SimpleStatement

Class SimpleStatement

cassandra/query.py:332–359  ·  view source on GitHub ↗

A simple, un-prepared query.

Source from the content-addressed store, hash-verified

330
331
332class SimpleStatement(Statement):
333 """
334 A simple, un-prepared query.
335 """
336
337 def __init__(self, query_string, retry_policy=None, consistency_level=None, routing_key=None,
338 serial_consistency_level=None, fetch_size=FETCH_SIZE_UNSET, keyspace=None,
339 custom_payload=None, is_idempotent=False):
340 """
341 `query_string` should be a literal CQL statement with the exception
342 of parameter placeholders that will be filled through the
343 `parameters` argument of :meth:`.Session.execute()`.
344
345 See :class:`Statement` attributes for a description of the other parameters.
346 """
347 Statement.__init__(self, retry_policy, consistency_level, routing_key,
348 serial_consistency_level, fetch_size, keyspace, custom_payload, is_idempotent)
349 self._query_string = query_string
350
351 @property
352 def query_string(self):
353 return self._query_string
354
355 def __str__(self):
356 consistency = ConsistencyLevel.value_to_name.get(self.consistency_level, 'Not Set')
357 return (u'<SimpleStatement query="%s", consistency=%s>' %
358 (self.query_string, consistency))
359 __repr__ = __str__
360
361
362class PreparedStatement(object):

Callers 15

mainFunction · 0.90
validate_ssl_optionsFunction · 0.90
_insertMethod · 0.90
_queryMethod · 0.90
_insertMethod · 0.90
_queryMethod · 0.90
test_recreatesMethod · 0.90
test_wide_batch_rowsMethod · 0.90
test_large_textMethod · 0.90
test_wide_tableMethod · 0.90

Calls

no outgoing calls

Tested by 15

validate_ssl_optionsFunction · 0.72
_insertMethod · 0.72
_queryMethod · 0.72
_insertMethod · 0.72
_queryMethod · 0.72
test_recreatesMethod · 0.72
test_wide_batch_rowsMethod · 0.72
test_large_textMethod · 0.72
test_wide_tableMethod · 0.72