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

Method _execute

cassandra/cqlengine/query.py:1365–1380  ·  view source on GitHub ↗
(self, statement)

Source from the content-addressed store, hash-verified

1363 self._timeout = timeout
1364
1365 def _execute(self, statement):
1366 connection = self.instance._get_connection() if self.instance else self.model._get_connection()
1367 if self._batch:
1368 if self._batch._connection:
1369 if not self._batch._connection_explicit and connection and \
1370 connection != self._batch._connection:
1371 raise CQLEngineException('BatchQuery queries must be executed on the same connection')
1372 else:
1373 # set the BatchQuery connection from the model
1374 self._batch._connection = connection
1375 return self._batch.add_query(statement)
1376 else:
1377 results = _execute_statement(self.model, statement, self._consistency, self._timeout, connection=connection)
1378 if self._if_not_exists or self._if_exists or self._conditional:
1379 check_applied(results)
1380 return results
1381
1382 def batch(self, batch_obj):
1383 if batch_obj is not None and not isinstance(batch_obj, BatchQuery):

Callers 5

_delete_null_columnsMethod · 0.95
updateMethod · 0.95
saveMethod · 0.95
deleteMethod · 0.95
updateMethod · 0.45

Calls 5

CQLEngineExceptionClass · 0.90
_execute_statementFunction · 0.85
check_appliedFunction · 0.85
_get_connectionMethod · 0.80
add_queryMethod · 0.80

Tested by

no test coverage detected