Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions airflow/utils/sqlalchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class UtcDateTime(TypeDecorator):

impl = TIMESTAMP(timezone=True)

cache_ok = True

def process_bind_param(self, value, dialect):
if value is not None:
if not isinstance(value, datetime.datetime):
Expand Down Expand Up @@ -110,6 +112,8 @@ class ExtendedJSON(TypeDecorator):

impl = Text

cache_ok = True

def db_supports_json(self):
"""Checks if the database supports JSON (i.e. is NOT MSSQL)"""
return not conf.get("database", "sql_alchemy_conn").startswith("mssql")
Expand Down Expand Up @@ -212,6 +216,8 @@ class Interval(TypeDecorator):

impl = Text

cache_ok = True

attr_keys = {
datetime.timedelta: ('days', 'seconds', 'microseconds'),
relativedelta.relativedelta: (
Expand Down