code stringlengths 3 6.57k |
|---|
semicolon(s) |
_RegisteredExtensionType(type) |
__new__(mcs, name, bases, dct) |
super(_RegisteredExtensionType, mcs) |
__new__(mcs, name, bases, dct) |
six.add_metaclass(_RegisteredExtensionType) |
RegisteredTableExtension(TableExtensionInterface) |
name (associated by key in the `system_schema.tables.extensions` map) |
extension (key in the map) |
protect_name(name) |
maybe_escape_name(name) |
protect_names(names) |
protect_name(n) |
protect_value(value) |
isinstance(value, (int, float, bool) |
str(value) |
lower() |
value.replace("'", "''") |
re.compile(r'^[a-z][0-9a-z_]*$') |
is_valid_name(name) |
name.lower() |
valid_cql3_word_re.match(name) |
maybe_escape_name(name) |
is_valid_name(name) |
escape_name(name) |
escape_name(name) |
name.replace('"', '""') |
ColumnMetadata(object) |
static (available in Cassandra 2.1+) |
reversed (DESC) |
__init__(self, table_metadata, column_name, cql_type, is_static=False, is_reversed=False) |
__str__(self) |
IndexMetadata(object) |
index (COMPOSITE, CUSTOM,...) |
__init__(self, keyspace_name, table_name, index_name, kind, index_options) |
as_cql_query(self) |
dict(self.index_options) |
options.pop("target") |
s (%s) |
protect_name(self.name) |
protect_name(self.keyspace_name) |
protect_name(self.table_name) |
options.pop("class_name") |
s (%s) |
protect_name(self.name) |
protect_name(self.keyspace_name) |
protect_name(self.table_name) |
_encoder.cql_encode_all_types(options, as_text_type=True) |
export_as_string(self) |
self.as_cql_query() |
TokenMap(object) |
__init__(self, token_class, token_to_host_owner, all_tokens, metadata) |
RLock() |
rebuild_keyspace(self, keyspace, build_if_absent=False) |
self.tokens_to_hosts_by_ks.get(keyspace, None) |
if (build_if_absent and current is None) |
or (not build_if_absent and current is not None) |
self._metadata.keyspaces.get(keyspace) |
self.replica_map_for_keyspace(self._metadata.keyspaces[keyspace]) |
log.exception("Failed creating a token map for keyspace '%s' with %s. PLEASE REPORT THIS: https://datastax-oss.atlassian.net/projects/PYTHON", keyspace, self.token_to_host_owner) |
replica_map_for_keyspace(self, ks_metadata) |
strategy.make_token_replica_map(self.token_to_host_owner, self.ring) |
remove_keyspace(self, keyspace) |
self.tokens_to_hosts_by_ks.pop(keyspace, None) |
get_replicas(self, keyspace, token) |
self.tokens_to_hosts_by_ks.get(keyspace, None) |
self.rebuild_keyspace(keyspace, build_if_absent=True) |
self.tokens_to_hosts_by_ks.get(keyspace, None) |
bisect_left(self.ring, token) |
len(self.ring) |
Token(object) |
__init__(self, token) |
hash_fn(cls, key) |
from_key(cls, key) |
cls(cls.hash_fn(key) |
from_string(cls, token_string) |
NotImplementedError() |
__eq__(self, other) |
__lt__(self, other) |
__hash__(self) |
hash(self.value) |
__repr__(self) |
NoMurmur3(Exception) |
HashToken(Token) |
from_string(cls, token_string) |
cls(int(token_string) |
Murmur3Token(HashToken) |
hash_fn(cls, key) |
int(murmur3(key) |
NoMurmur3() |
__init__(self, token) |
int(token) |
MD5Token(HashToken) |
hash_fn(cls, key) |
isinstance(key, six.text_type) |
key.encode('UTF-8') |
abs(varint_unpack(md5(key) |
digest() |
BytesToken(Token) |
from_string(cls, token_string) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.