flask_restful_dbbase.DBBase.apply_driver_hacks

DBBase.apply_driver_hacks(app, sa_url, options)

This method is called before engine creation and used to inject driver specific hacks into the options. The options parameter is a dictionary of keyword arguments that will then be used to call the sqlalchemy.create_engine() function.

The default implementation provides some saner defaults for things like pool sizes for MySQL and sqlite. Also it injects the setting of SQLALCHEMY_NATIVE_UNICODE.

Changed in version 2.5: Returns (sa_url, options). SQLAlchemy 1.4 made the URL immutable, so any changes to it must now be passed back up to the original caller.