mazziechai / DonguriGaeru

A Puyo Puyo ranking system
GNU Affero General Public License v3.0
4 stars 0 forks source link

Database helper commands #9

Closed mazziechai closed 3 years ago

mazziechai commented 3 years ago

I also had the idea of allowing raw SQL queries through the Discord bot (whitelisted to only us), but I'm on the fence about allowing this. After all, I can just pull up the PostgreSQL shell and run commands through that. It would be a convenient option, but potentially unsafe.

amosborne commented 3 years ago

I would probably avoid the raw sql thru discord.

for the others, checkout sqlalchemy Query .filter and .order_by Commands. All the above should be one liners.

mazziechai commented 3 years ago

for the others, checkout sqlalchemy Query .filter and .order_by Commands. All the above should be one liners.

I updated the SQLAlchemy syntax to 2.0 using the future flag when instantiating the engine and session, so Query isn't used anymore.