From: Federico Caselli Date: Wed, 26 Mar 2025 20:43:10 +0000 (+0100) Subject: document sqlite truncate_microseconds in DATETIME and TIME X-Git-Tag: rel_2_0_40~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4655b1bbb5e810c3627a70135bf2a4b1d7af5eee;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git document sqlite truncate_microseconds in DATETIME and TIME Change-Id: I93412d951b466343f2cf9b6d513ad46d17f5d8ee (cherry picked from commit a9b37199133eea81ebdf062439352ef2745d3c00) --- diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index c09fbb32cc..bf632f1fa4 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -1048,6 +1048,10 @@ class DATETIME(_DateTimeMixin, sqltypes.DateTime): regexp=r"(\d+)/(\d+)/(\d+) (\d+)-(\d+)-(\d+)", ) + :param truncate_microseconds: when ``True`` microseconds will be truncated + from the datetime. Can't be specified together with ``storage_format`` + or ``regexp``. + :param storage_format: format string which will be applied to the dict with keys year, month, day, hour, minute, second, and microsecond. @@ -1234,6 +1238,10 @@ class TIME(_DateTimeMixin, sqltypes.Time): regexp=re.compile("(\d+)-(\d+)-(\d+)-(?:-(\d+))?"), ) + :param truncate_microseconds: when ``True`` microseconds will be truncated + from the time. Can't be specified together with ``storage_format`` + or ``regexp``. + :param storage_format: format string which will be applied to the dict with keys hour, minute, second, and microsecond.