]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
document sqlite truncate_microseconds in DATETIME and TIME
authorFederico Caselli <cfederico87@gmail.com>
Wed, 26 Mar 2025 20:43:10 +0000 (21:43 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Wed, 26 Mar 2025 20:44:11 +0000 (21:44 +0100)
Change-Id: I93412d951b466343f2cf9b6d513ad46d17f5d8ee
(cherry picked from commit a9b37199133eea81ebdf062439352ef2745d3c00)

lib/sqlalchemy/dialects/sqlite/base.py

index 21ee004997f02be47ddada7b9e55b391a26bfe7b..94715747059517412d9fa5d4d74fcbe9e960a23c 100644 (file)
@@ -937,6 +937,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.
 
@@ -1103,6 +1107,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.