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

Class Column

cassandra/cqlengine/columns.py:90–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88
89
90class Column(object):
91
92 # the cassandra type this column maps to
93 db_type = None
94 value_manager = BaseValueManager
95
96 instance_counter = 0
97
98 _python_type_hashable = True
99
100 primary_key = False
101 """
102 bool flag, indicates this column is a primary key. The first primary key defined
103 on a model is the partition key (unless partition keys are set), all others are cluster keys
104 """
105
106 partition_key = False
107
108 """
109 indicates that this column should be the partition key, defining
110 more than one partition key column creates a compound partition key
111 """
112
113 index = False
114 """
115 bool flag, indicates an index should be created for this column
116 """
117
118 custom_index = False
119 """
120 bool flag, indicates an index is managed outside of cqlengine. This is
121 useful if you want to do filter queries on fields that have custom
122 indexes.
123 """
124
125 db_field = None
126 """
127 the fieldname this field will map to in the database
128 """
129
130 default = None
131 """
132 the default value, can be a value or a callable (no args)
133 """
134
135 required = False
136 """
137 boolean, is the field required? Model validation will raise and
138 exception if required is set to True and there is a None value assigned
139 """
140
141 clustering_order = None
142 """
143 only applicable on clustering keys (primary keys that are not partition keys)
144 determines the order that the clustering keys are sorted on disk
145 """
146
147 discriminator_column = False

Callers 15

test_context_updateMethod · 0.90
test_contextMethod · 0.90
test_statementMethod · 0.90
test_context_updateMethod · 0.90
test_renderingMethod · 0.90
test_contextMethod · 0.90
test_context_updateMethod · 0.90

Calls

no outgoing calls

Tested by 15

test_context_updateMethod · 0.72
test_contextMethod · 0.72
test_statementMethod · 0.72
test_context_updateMethod · 0.72
test_renderingMethod · 0.72
test_contextMethod · 0.72
test_context_updateMethod · 0.72