(model, statement, consistency_level, timeout, connection=None)
| 1520 | |
| 1521 | |
| 1522 | def _execute_statement(model, statement, consistency_level, timeout, connection=None): |
| 1523 | params = statement.get_context() |
| 1524 | s = SimpleStatement(str(statement), consistency_level=consistency_level, fetch_size=statement.fetch_size) |
| 1525 | if model._partition_key_index: |
| 1526 | key_values = statement.partition_key_values(model._partition_key_index) |
| 1527 | if not any(v is None for v in key_values): |
| 1528 | parts = model._routing_key_from_values(key_values, conn.get_cluster(connection).protocol_version) |
| 1529 | s.routing_key = parts |
| 1530 | s.keyspace = model._get_keyspace() |
| 1531 | connection = connection or model._get_connection() |
| 1532 | return conn.execute(s, params, timeout=timeout, connection=connection) |
no test coverage detected