Esempio n. 1
0
 def sqla_13_all_users(session: Session = Depends(),
                       paginate: Paginate = Depends()):
     query = (session.query(user_cls).options(joinedload("notes")).order_by(
         user_cls.id))
     return paginate(query)
Esempio n. 2
0
 def query_count(session: Session, query: DbQuery) -> int:
     return (session.query(user_cls).statement.with_only_columns(
         [func.count()]).scalar())