flask 数据库查询监控
In debug mode Flask-SQLAlchemy will log all the SQL queries sent
to the database.  This information is available until the end of request
which makes it possible to easily ensure that the SQL generated is the
one expected on errors or in unittesting.  If you don’t want to enable
the DEBUG mode for your unittests you can also enable the query
recording by setting the 'SQLALCHEMY_RECORD_QUERIES' config variable
to True.  This is automatically enabled if Flask is in testing mode.
The value returned will be a list of named tuples with the following
attributes:
example:
1  | def register_request_handlers(app):  | 
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 jiaklop9!
 评论