pallets-eco / flask-session

Server side session extension for Flask
https://flask-session.readthedocs.io
BSD 3-Clause "New" or "Revised" License
488 stars 236 forks source link

Why does SqlAlchemySessionInterface take a table name but not a bind name? #207

Closed leathakkor closed 5 months ago

leathakkor commented 6 months ago

It seems like

        class Session(self.db.Model):
            __tablename__ = table
           ... 

should be more like:

        class Session1(self.db.Model):
            __tablename__ = table
            __bind_key__ = bind_key_name

If you are using sqlalchemy and want to store session in a separate database than your primary for whatever reason you would not be able to use this class out of the box.

Perhaps this is already supported and I am simply missing it.

Lxstr commented 5 months ago

Added from 0.6.0