Skip to content

Commit b2a5cb9

Browse files
committed
Columns doc corrections
1 parent 28ca35c commit b2a5cb9

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

cassandra/cqlengine/columns.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class Column(object):
108108
primary_key = False
109109
"""
110110
bool flag, indicates this column is a primary key. The first primary key defined
111-
on a model is the partition key (unless partition keys are set), all others are cluster keys
111+
on a model is the partition key (unless partition keys are set), all others are cluster keys
112112
"""
113113

114114
partition_key = False
@@ -123,32 +123,32 @@ class Column(object):
123123
bool flag, indicates an index should be created for this column
124124
"""
125125

126-
db_field = False
126+
db_field = None
127127
"""
128128
the fieldname this field will map to in the database
129129
"""
130130

131-
default = False
131+
default = None
132132
"""
133133
the default value, can be a value or a callable (no args)
134134
"""
135135

136136
required = False
137137
"""
138138
boolean, is the field required? Model validation will raise and
139-
exception if required is set to True and there is a None value assigned
139+
exception if required is set to True and there is a None value assigned
140140
"""
141141

142-
clustering_order = False
142+
clustering_order = None
143143
"""
144144
only applicable on clustering keys (primary keys that are not partition keys)
145-
determines the order that the clustering keys are sorted on disk
145+
determines the order that the clustering keys are sorted on disk
146146
"""
147147

148148
polymorphic_key = False
149149
"""
150150
boolean, if set to True, this column will be used for saving and loading instances
151-
of polymorphic tables
151+
of polymorphic tables
152152
"""
153153

154154
static = False

docs/api/cassandra/cqlengine/columns.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ Columns
1717

1818
.. autoattribute:: primary_key
1919

20-
.. autoattribute:: primary_key
21-
2220
.. autoattribute:: partition_key
2321

2422
.. autoattribute:: index
@@ -50,6 +48,8 @@ Columns of all types are initialized by passing :class:`.Column` attributes to t
5048

5149
.. autoclass:: Boolean(**kwargs)
5250

51+
.. autoclass:: Counter(**kwargs)
52+
5353
.. autoclass:: Date(**kwargs)
5454

5555
.. autoclass:: DateTime(**kwargs)

0 commit comments

Comments
 (0)