summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/functions.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2021-12-07 15:46:54 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2021-12-07 15:46:54 +0000
commitca186ff935718e3e57bf9ecbf2619cd6109996d0 (patch)
tree568cc3ed1315feb68af2c78344a5edef89014e64 /lib/sqlalchemy/sql/functions.py
parent1411f0bc4898737e3a575933e30c85a84b0bfb02 (diff)
parent22deafe15289d2be55682e1632016004b02b62c0 (diff)
downloadsqlalchemy-ca186ff935718e3e57bf9ecbf2619cd6109996d0.tar.gz
Merge "Warn when caching is disabled / document" into main
Diffstat (limited to 'lib/sqlalchemy/sql/functions.py')
-rw-r--r--lib/sqlalchemy/sql/functions.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py
index fff2defe0..5d2e78065 100644
--- a/lib/sqlalchemy/sql/functions.py
+++ b/lib/sqlalchemy/sql/functions.py
@@ -917,6 +917,7 @@ class GenericFunction(Function, metaclass=_GenericMeta):
class as_utc(GenericFunction):
type = DateTime
+ inherit_cache = True
print(select(func.as_utc()))
@@ -931,6 +932,7 @@ class GenericFunction(Function, metaclass=_GenericMeta):
class as_utc(GenericFunction):
type = DateTime
package = "time"
+ inherit_cache = True
The above function would be available from :data:`.func`
using the package name ``time``::
@@ -948,6 +950,7 @@ class GenericFunction(Function, metaclass=_GenericMeta):
package = "geo"
name = "ST_Buffer"
identifier = "buffer"
+ inherit_cache = True
The above function will render as follows::
@@ -966,6 +969,7 @@ class GenericFunction(Function, metaclass=_GenericMeta):
package = "geo"
name = quoted_name("ST_Buffer", True)
identifier = "buffer"
+ inherit_cache = True
The above function will render as::