compat.py 159 B

12345
  1. def get_scalar_subquery(query):
  2. try:
  3. return query.scalar_subquery()
  4. except AttributeError: # SQLAlchemy <1.4
  5. return query.as_scalar()