code stringlengths 3 6.57k |
|---|
len(ring) |
hosts.append(host) |
export_for_schema(self) |
__eq__(self, other) |
isinstance(other, SimpleStrategy) |
NetworkTopologyStrategy(ReplicationStrategy) |
__init__(self, dc_replication_factors) |
str(k) |
int(v) |
dc_replication_factors.items() |
make_token_replica_map(self, token_to_host_owner, ring) |
dict((dc, int(rf) |
self.dc_replication_factors.items() |
defaultdict(list) |
defaultdict(set) |
defaultdict(set) |
enumerate(ring) |
append(i) |
add(host.rack) |
add(host) |
defaultdict(int) |
defaultdict(list) |
range(len(ring) |
dc_to_token_offset.keys() |
len(token_offsets) |
set() |
len(hosts_per_dc[dc]) |
six.moves.range(index, index+num_tokens) |
len(token_offsets) |
len(token_offsets) |
len(racks_placed) |
len(racks_this_dc) |
skipped_hosts.append(host) |
replicas.append(host) |
racks_placed.add(host.rack) |
len(racks_placed) |
len(racks_this_dc) |
replicas.append(host) |
export_for_schema(self) |
sorted(self.dc_replication_factors.items() |
__eq__(self, other) |
isinstance(other, NetworkTopologyStrategy) |
LocalStrategy(ReplicationStrategy) |
__init__(self, options_map) |
make_token_replica_map(self, token_to_host_owner, ring) |
export_for_schema(self) |
__eq__(self, other) |
isinstance(other, LocalStrategy) |
KeyspaceMetadata(object) |
__init__(self, name, durable_writes, strategy_class, strategy_options) |
ReplicationStrategy.create(strategy_class, strategy_options) |
export_as_string(self) |
join([self.as_cql_query() |
self.user_type_strings() |
f.export_as_string() |
self.functions.values() |
a.export_as_string() |
self.aggregates.values() |
t.export_as_string() |
self.tables.values() |
traceback.format_exception(*self._exc_info) |
n(this should not be used to reproduce this schema) |
format(ks=self.name, cql=cql) |
as_cql_query(self) |
format(protect_name(self.name) |
protect_name(self.name) |
self.replication_strategy.export_for_schema() |
user_type_strings(self) |
self.user_types.copy() |
sorted(user_types.keys() |
self.resolve_user_types(k, user_types, user_type_strings) |
resolve_user_types(self, key, user_types, user_type_strings) |
user_types.pop(key) |
types.cql_types_from_string(type_name) |
self.resolve_user_types(sub_type, user_types, user_type_strings) |
user_type_strings.append(user_type.export_as_string() |
_add_table_metadata(self, table_metadata) |
self.tables.get(table_metadata.name, None) |
six.iteritems(table_metadata.indexes) |
in (n for n in old_indexes if n not in table_metadata.indexes) |
self.indexes.pop(index_name, None) |
_drop_table_metadata(self, table_name) |
self.tables.pop(table_name, None) |
self.indexes.pop(index_name, None) |
self.views.pop(view_name, None) |
self.views.pop(table_name, None) |
views.pop(table_name, None) |
_add_view_metadata(self, view_metadata) |
UserType(object) |
__init__(self, keyspace, name, field_names, field_types) |
as_cql_query(self, formatted=False) |
protect_name(self.keyspace) |
protect_name(self.name) |
zip(self.field_names, self.field_types) |
fields.append("%s %s" % (protect_name(field_name) |
field_join.join("%s%s" % (padding, field) |
export_as_string(self) |
self.as_cql_query(formatted=True) |
Aggregate(object) |
as_cql_query(self, formatted=False) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.