def modify_trade_secondary_book(trade_id, book): """This function change the secondary book of a trade.""" Trade.get( Trade.id == trade_id ).update(Trade.book_two == book).execute()
def modify_trade_primary_user(trade_id, user): """This function change the secondary user of a trade.""" Trade.get( Trade.id == trade_id ).update(Trade.user_two == user).execute()
def modify_trade_primary_book(trade_id, book): """This function change the primary book of a trade.""" Trade.get( Trade.id == trade_id ).update(Trade.book_one == book).execute()
def delete_trade(trade_id): Trade.get( Trade.id == trade_id ).delete_instance()