Ticket #1511 (closed enhancement: fixed)

Opened 9 years ago

Last modified 9 years ago

Bad type conversion for engine_settings

Reported by: droodle Owned by: apoirier
Priority: major Component: database tier
Version: 0.3.0 Keywords:


In the database section of an app configuration, you can specify entries like pool_recycle or echo_pool.

By default, all those entries are passed as strings to the SQLAlchemy create_engine function but :

  • pool_recycle must be converted to integer
  • echo_pool must be converted to boolean
  • others....

The engine won't take them into account if they aren't of the expected type.

SQLAlchemy provides the function "sqalchemy.engine.engine_from_config" that takes care of all the type conversions.
Maybe that's helpful.

Change History

comment:1 Changed 9 years ago by Alain Poirier <alain.poirier@…>

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.