Create and modify drinks function.
This commit is contained in:
@@ -24,6 +24,14 @@ class WriteFunctions:
|
||||
sql.Player.hex_id: player.hex_id})
|
||||
.execute())
|
||||
|
||||
@staticmethod
|
||||
def update_drink(drink: 'models.Drink', *_):
|
||||
(sql.Drink
|
||||
.insert(id=drink.id, name=drink.name, vol=drink.vol)
|
||||
.on_conflict(update={sql.Drink.name: drink.name,
|
||||
sql.Drink.vol: drink.vol})
|
||||
.execute())
|
||||
|
||||
@staticmethod
|
||||
def update_season(season: 'models.Season', *_):
|
||||
(sql.Season
|
||||
|
||||
Reference in New Issue
Block a user