]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
(doc) add documentation for postgresql dialect time and timestamp types
authorDaniel Hall <daniel.hall@moesol.com>
Tue, 28 Jun 2022 18:25:41 +0000 (11:25 -0700)
committerDaniel Hall <daniel.hall@moesol.com>
Tue, 28 Jun 2022 18:25:41 +0000 (11:25 -0700)
doc/build/dialects/postgresql.rst
lib/sqlalchemy/dialects/postgresql/types.py

index ea0c2aa42a034c533019f7da3f4c5a20caf7469b..75af0fea4e781c2c0f5b3b57aaee6b16ea95e5f1 100644 (file)
@@ -71,6 +71,12 @@ construction arguments, are as follows:
 
 .. autoclass:: INET
 
+.. autoclass:: TIMESTAMP
+    :members: __init__
+
+.. autoclass:: TIME
+    :members: __init__
+
 .. autoclass:: INTERVAL
     :members: __init__
 
index 374adcac1ff88d6def31b15538e9e815617625e6..eea88ddc9b5e5b5fc4462b9e2d31219c74ca60d8 100644 (file)
@@ -114,13 +114,37 @@ class REGCLASS(sqltypes.TypeEngine[str]):
 
 
 class TIMESTAMP(sqltypes.TIMESTAMP):
+
+    """Provide the PostgreSQL TIMESTAMP type."""
+
+    __visit_name__ = "TIMESTAMP"
     def __init__(self, timezone=False, precision=None):
+        """Construct a TIMESTAMP.
+
+        :param timezone: boolean value if timezone present, default False
+        :param precision: optional integer precision value
+
+         .. versionadded:: 1.4
+
+        """
         super(TIMESTAMP, self).__init__(timezone=timezone)
         self.precision = precision
 
 
 class TIME(sqltypes.TIME):
+
+    """PostgreSQL TIME type."""
+
+    __visit_name__ = "TIME"
     def __init__(self, timezone=False, precision=None):
+        """Construct a TIME.
+
+        :param timezone: boolean value if timezone present, default False
+        :param precision: optional integer precision value
+
+         .. versionadded:: 1.4
+
+        """
         super(TIME, self).__init__(timezone=timezone)
         self.precision = precision