This answer tells you how to get the last row from a session query:
obj = session.query(ObjectRes).order_by(ObjectRes.id.desc()).first()
I need the one before it - how do you get the second last one?
This answer tells you how to get the last row from a session query:
obj = session.query(ObjectRes).order_by(ObjectRes.id.desc()).first()
I need the one before it - how do you get the second last one?