Skip to content

Commit cea9679

Browse files
committed
Changes and attribution for model_class and query_class changes
1 parent 050527c commit cea9679

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ Patches and Suggestions
4747
- Ignacy Sokołowski
4848
- Steven Harms
4949
- David Lord @davidism
50+
- Alec Nikolas Reiter @justanr

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Version 3.0
99

1010
In development, codename Dubnium
1111

12+
- Added support for custom ``query_class`` and ``model_class`` as args
13+
to the ``SQLAlchemy`` constructor.
1214
- Fix minimum SQLAlchemy version requirement (0.9.2 or above), introduced
1315
by custom MetaData support in 2.1.
1416

flask_sqlalchemy/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,16 @@ class User(db.Model):
709709
.. versionadded:: 2.1
710710
The `metadata` parameter was added. This allows for setting custom
711711
naming conventions among other, non-trivial things.
712+
713+
.. versionadded:: 3.0
714+
The `query_class` parameter was added, to allow customisation
715+
of the query class, in place of the default of :class:`BaseQuery`.
716+
717+
The `model_class` parameter was added, which allows a custom model
718+
class to be used in place of :class:`Model`.
719+
720+
.. versionchanged:: 3.0
721+
Utilise the same query class across `session`, `Model.query` and `Query`.
712722
"""
713723

714724
#: Default query class used by :attr:`Model.query` and other queries.

0 commit comments

Comments
 (0)