I'm using fastapi with sqlalchemy, This is my code for inserting new record
def insert_price(db: Session, price_list: schemas.PriceList):
db_price = models.PriceList(**price_list.dict())
db.add(db_price)
db.commit()
db.refresh(db_price)
return db_price
i have a unique column and i want to update on duplicate how can i handle that?