- changed status to resolved
[PATCH] Pass url query part to underlying DB-API connect method
Issue #256
resolved
This is a patch as per discussion on the mailing list (http://www.mail-archive.com/sqlalchemy-users@lists.sourceforge.net/msg02821.html) that passes any query-arguments on the url as keyword parameters to the connect(...) call to the underlying DB-API.
For example, if you have a MySQL database properly set up with encodings and collations on character columns and you want SA to play nice with other clients and it's UTF-8 encoded Unicode datatypes, you can use this url:
(this tells mysql that SA is going to read and write strings as UTF-8 so that mysql can properly translate them to and from the column/table/database character set)
The patch is preliminary and has only been tested for MySQL.
For all db-modules, it just tacks the query part (which is a string->string dict) on the connect parameter-list. Only in the mysql module, certain parameters are converted to the correct type (such as connect_timeout converted to int etc.).
Comments (1)
-
repo owner - Log in to comment
thanks for providing ! i made one change to firebird to not propigate the arguments that it takes at the module level. committed in changeset:1746.