I am trying to find out if there is any nicer way I can check if a table of users contains a group of names instead of checking them one at a time
This is what I am using to currently check the User table one at a time which gives me True or False if the user exists in the table:
ret = session.query(exists().where(Users.name == 'Jack')).scalar()
So is there a way to do this:
ret = session.query(exists().where(Users.name == 'Jack', 'Bob', 'Sandy')).scalar()
Rather than this:
ret1 = session.query(exists().where(Users.name == 'Jack')).scalar()
ret2 = session.query(exists().where(Users.name == 'Bob')).scalar()
ret3 = session.query(exists().where(Users.name == 'Sandy')).scalar()