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

Method column_family_name

cassandra/cqlengine/models.py:551–563  ·  view source on GitHub ↗

Returns the column family name if it's been defined otherwise, it creates it from the module and class name

(cls, include_keyspace=True)

Source from the content-addressed store, hash-verified

549
550 @classmethod
551 def column_family_name(cls, include_keyspace=True):
552 """
553 Returns the column family name if it's been defined
554 otherwise, it creates it from the module and class name
555 """
556 cf_name = protect_name(cls._raw_column_family_name())
557 if include_keyspace:
558 keyspace = cls._get_keyspace()
559 if not keyspace:
560 raise CQLEngineException("Model keyspace is not set and no default is available. Set model keyspace or setup connection before attempting to generate a query.")
561 return '{0}.{1}'.format(protect_name(keyspace), cf_name)
562
563 return cf_name
564
565
566 @classmethod

Calls 4

protect_nameFunction · 0.90
CQLEngineExceptionClass · 0.90
_get_keyspaceMethod · 0.80