flask-sqlalchemy icon indicating copy to clipboard operation
flask-sqlalchemy copied to clipboard

Adds SQLAlchemy support to Flask

Results 110 flask-sqlalchemy issues
Sort by recently updated
recently updated
newest added

Unable to only reflect a single table that I want to use with flask-sqlalchemy, there should be an option like db.reflect(bind='db2',only=['table1']) to only reflect a table from specific db.

I would like to be able to determine when changes have been committed to the db so that a query from a different worker will see the new data. It...

We currently cache the SQLAlchemy engine in `_EngineConnector` based on the echo setting. Prior to #684, that was the main engine option we supported. However, with more ways to customize...

I never remember to call .items, and I was just reminded of this when getting a new developer spun up. Instead of: ``` for obj in MyModel.query.paginate(1).items: pass ``` I...

pagination

When using the compiles decorator as in this example: http://docs.sqlalchemy.org/en/rel_0_8/core/compiler.html#compiling-sub-elements-of-a-custom-expression-construct Queries constructed in this way do not seem to obey the bind_key in the info dictionary on the table. In...

Hello, SQLAlchemy allows us to use custom session classes in case we wanna override default behavior: ``` python sqlalchemy.orm.scoped_session( sqlalchemy.orm.sessionmaker( autocommit=False, autoflush=False, bind=self.engine, class_=NoDeleteSession # Custom session class ) )...

config

I am unable to set the search_path and have it persist, when using binds. This used to work fine ``` test_application = create_app(config=IntegrationTestConfig, create_first_user=False) with test_application.app_context(): db.session.execute('CREATE SCHEMA IF NOT...

I can't figure out how to call `db.create_all()` without triggering intermediate commits after each table is created: http://stackoverflow.com/questions/34410091/flask-sqlalchemy-how-can-i-call-db-create-all-and-db-drop-all-without-trigg Pretty sure vanilla SQLAlchemy doesn't have them in `db.metadata.create_all`. I'm not sure...

``` def _wrap_with_default_query_class(fn, cls): @functools.wraps(fn) def newfn(*args, **kwargs): _set_default_query_class(kwargs, cls) if "backref" in kwargs: backref = kwargs['backref'] if isinstance(backref, string_types): backref = (backref, {}) _set_default_query_class(backref[1], cls) return fn(*args, **kwargs) return...

Currently flask-sqlalchemy will call `session.remove()` when `app.teardown_appcontext` is called. Because application contexts can be stacked, it means that we will remove the session when the inner most application context is...