Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1215 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

[PATCH] Enhance the get_engine() function to pass any sqlalchemy config parameter to sqlalchemy.create_engine() (Currently only 'dburi' and 'echo' supported).

Reported by: eleftherios Owned by: anonymous
Priority: low Milestone:
Component: unassigned Version: trunk
Severity: trivial Keywords:
Cc:

Description

At the moment we can specify the "sqlalchemy.dburi" and "sqlalchemy.echo" parameters at the configuration. These get passed to sqlalchemy.create_engine() via get_engine() in database.py.

SQLAlchemy create_engine() accepts more that these two parameters; these are documented at  http://www.sqlalchemy.org/docs/dbengine.myt. Some of these are useful quite often, like convert_unicode=True for example.

It would be a good enhancement to be able to specify any of these parameters as sqlalchemy.param_name at the config and pass these to create_engine().

Attachments

database.py-enhance-get_engine.patch Download (984 bytes) - added by eleftherios 12 years ago.
Patch get_engine() in database.py to accept and pass slqalchemy config parameters to create_engine()

Change History

Changed 12 years ago by eleftherios

Patch get_engine() in database.py to accept and pass slqalchemy config parameters to create_engine()

comment:1 Changed 12 years ago by eleftherios

  • Summary changed from Enhance the get_engine() function to pass any sqlalchemy config parameter to sqlalchemy.create_engine() (Currently only 'dburi' and 'echo' supported). to [PATCH] Enhance the get_engine() function to pass any sqlalchemy config parameter to sqlalchemy.create_engine() (Currently only 'dburi' and 'echo' supported).

At the moment we can specify the "sqlalchemy.dburi" and "sqlalchemy.echo" parameters at the configuration. These get passed to sqlalchemy.create_engine() via get_engine() in database.py.

SQLAlchemy create_engine() accepts more that these two parameters; these are documented at  http://www.sqlalchemy.org/docs/dbengine.myt. Some of these are useful quite often, like convert_unicode=True for example.

It would be a good enhancement to be able to specify any of these parameters as sqlalchemy.param_name at the config and pass these to create_engine().

This patch parses all the sqlalchemy.param parameters that it finds in the config to sqlalachemy.create_engine().

comment:2 Changed 12 years ago by alberto

  • Status changed from new to closed
  • Resolution set to fixed

comitted at [2318]. Thanks :)

Note: See TracTickets for help on using tickets.