- attached Interval.patch
new Interval type patch contribute
Here is a small patch to add support of storing timedelta valuesin SQL databases. If possible it tries to use native DB support of timedelta (just PostgreSQL for now), if there is no such it fallbacks to store timedeltas as sqltypes.DateTime with base of zero timestamp.
Comments (11)
-
Account Deleted -
repo owner - attached interval.2.patch
revised patch
-
repo owner attached is a revised patch which adds a template method to
TypeDecorator
such that the interval type need not duplicate the code withindialect_impl()
. Also, the check for thePGDialect
and the retrieval of theDateTime
dialect implementation have been extracted into two methods since the latter is an expensive operation that is not needed withinconvert_bind_param()
andconvert_result_value()
.need to verify that this new patch functions correctly. Alternatively, provide a patch for
test/sql/testtypes.py
that adds unit test support for this new type. -
Account Deleted - attached interval.3.patch
Corrected revised patch, tested on PostgreSQL and sqlite
-
Account Deleted - attached interval.4.patch
FIX: Interval type doesn't work with orm
-
repo owner - changed status to resolved
committed + unit test (not orm though) in changeset:2746
-
Account Deleted - removed status
- changed status to open
Patch to revision 2746.
IMPROVE: more clearer handle if Interval type will have native support in multiple engines FIX: now correctly work with orm, heavily tested.
-
Account Deleted - attached interval.6.patch
FIX: incorrect handle of Null values
-
repo owner - changed milestone to 0.3.9
-
repo owner - changed status to resolved
-
repo owner - removed milestone
Removing milestone: 0.3.9 (automated comment)
- Log in to comment
Interval type patch