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

Method _build_aggregate

cassandra/metadata.py:2136–2146  ·  view source on GitHub ↗
(cls, aggregate_row)

Source from the content-addressed store, hash-verified

2134
2135 @classmethod
2136 def _build_aggregate(cls, aggregate_row):
2137 cass_state_type = types.lookup_casstype(aggregate_row['state_type'])
2138 initial_condition = aggregate_row['initcond']
2139 if initial_condition is not None:
2140 initial_condition = _encoder.cql_encode_all_types(cass_state_type.deserialize(initial_condition, 3))
2141 state_type = _cql_from_cass_type(cass_state_type)
2142 return_type = cls._schema_type_to_cql(aggregate_row['return_type'])
2143 return Aggregate(aggregate_row['keyspace_name'], aggregate_row['aggregate_name'],
2144 aggregate_row['signature'], aggregate_row['state_func'], state_type,
2145 aggregate_row['final_func'], initial_condition, return_type,
2146 aggregate_row.get('deterministic', False))
2147
2148 def _build_table_metadata(self, row, col_rows=None, trigger_rows=None):
2149 keyspace_name = row["keyspace_name"]

Callers 1

get_all_keyspacesMethod · 0.95

Calls 6

_cql_from_cass_typeFunction · 0.85
AggregateClass · 0.85
cql_encode_all_typesMethod · 0.80
deserializeMethod · 0.45
_schema_type_to_cqlMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected