Skip to content

Commit 38705c2

Browse files
committed
cqle: Note about Date type in upgrade guide
1 parent f00bfe7 commit 38705c2

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

docs/api/cassandra/cqlengine/columns.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Columns of all types are initialized by passing :class:`.Column` attributes to t
5252

5353
.. autoclass:: Counter
5454

55-
.. autoclass:: Date
55+
.. autoclass:: Date(**kwargs)
5656

5757
.. autoclass:: DateTime(**kwargs)
5858

docs/cqlengine/upgrade_guide.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,23 @@ conversion to this package will still require certain minimal updates (namely, i
88

99
**THERE IS ONE FUNCTIONAL CHANGE**, described in the first section below.
1010

11-
Functional Change
12-
=================
11+
Functional Changes
12+
==================
13+
List Prepend Reversing
14+
----------------------
1315
Legacy cqlengine included a workaround for a Cassandra bug in which prepended list segments were
1416
reversed (`CASSANDRA-8733 <https://issues.apache.org/jira/browse/CASSANDRA-8733>`_). As of
1517
this integration, this workaround is removed. The first released integrated version emits
1618
a warning when prepend is used. Subsequent versions will have this warning removed.
1719

20+
Date Column Type
21+
----------------
22+
The Date column type in legacy cqlengine used a ``timestamp`` CQL type and truncated the time.
23+
Going forward, the :class:`~.columns.Date` type represents a ``date`` for Cassandra 2.2+
24+
(`PYTHON-245 <https://datastax-oss.atlassian.net/browse/PYTHON-245>`_).
25+
Users of the legacy functionality should convert models to use :class:`~.columns.DateTime` (which
26+
uses ``timestamp`` internally), and use the build-in ``datetime.date`` for input values.
27+
1828
Remove cqlengine
1929
================
2030
To avoid confusion or mistakes using the legacy package in your application, it

0 commit comments

Comments
 (0)