MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / normalize

Method normalize

test/dialect/mysql/test_types.py:786–792  ·  view source on GitHub ↗
(dt)

Source from the content-addressed store, hash-verified

784
785 # normalize dates for the amount of time the operation took
786 def normalize(dt):
787 if dt is None:
788 return None
789 elif now <= dt <= new_now:
790 return now
791 else:
792 return dt
793
794 now = connection.exec_driver_sql("select now()").scalar()
795 connection.execute(ts_table.insert(), {"t1": now, "t2": None})

Callers 2

test_basicMethod · 0.45
check_table_columnMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected