Merge "Set "cache_ok=True" in "TypeDecorator" inheriting classes"

This commit is contained in:
Zuul 2021-11-11 14:37:56 +00:00 committed by Gerrit Code Review
commit 79436a84cc
1 changed files with 2 additions and 0 deletions

View File

@ -38,6 +38,7 @@ class IPAddress(types.TypeDecorator):
"""An SQLAlchemy type representing an IP-address."""
impl = types.String
cache_ok = True
def load_dialect_impl(self, dialect):
if dialect.name == 'postgresql':
@ -61,6 +62,7 @@ class CIDR(types.TypeDecorator):
"""An SQLAlchemy type representing a CIDR definition."""
impl = types.String
cache_ok = True
def load_dialect_impl(self, dialect):
if dialect.name == 'postgresql':