Ejemplo n.º 1
0
 def get_all(user_id):
     all_shopping = db.session.query(Shopping).filter(db.text(" userid=:user_id")).params(user_id=int(user_id)).all()
     return all_shopping
Ejemplo n.º 2
0
 def get_user_by_name(username):
     user = User.query.filter(db.text("nickname=:name")).params(name=username).first()
     return user