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

Class ColumnMetadata

cassandra/metadata.py:1606–1643  ·  view source on GitHub ↗

A representation of a single column in a table.

Source from the content-addressed store, hash-verified

1604
1605
1606class ColumnMetadata(object):
1607 """
1608 A representation of a single column in a table.
1609 """
1610
1611 table = None
1612 """ The :class:`.TableMetadata` this column belongs to. """
1613
1614 name = None
1615 """ The string name of this column. """
1616
1617 cql_type = None
1618 """
1619 The CQL type for the column.
1620 """
1621
1622 is_static = False
1623 """
1624 If this column is static (available in Cassandra 2.1+), this will
1625 be :const:`True`, otherwise :const:`False`.
1626 """
1627
1628 is_reversed = False
1629 """
1630 If this column is reversed (DESC) as in clustering order
1631 """
1632
1633 _cass_type = None
1634
1635 def __init__(self, table_metadata, column_name, cql_type, is_static=False, is_reversed=False):
1636 self.table = table_metadata
1637 self.name = column_name
1638 self.cql_type = cql_type
1639 self.is_static = is_static
1640 self.is_reversed = is_reversed
1641
1642 def __str__(self):
1643 return "%s %s" % (self.name, self.cql_type)
1644
1645
1646class IndexMetadata(object):

Calls

no outgoing calls