diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2010-03-09 10:38:29 +0100 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2010-03-09 10:38:29 +0100 |
commit | 8dd4d45de31cb7a519b6993bdc74f113fd8fe5a5 (patch) | |
tree | 8d161263e8a715ad0b64a17c6768b403b9d6c890 /adbh.py | |
parent | 98f8214fac4027c4b82e257b99af702236893d1f (diff) | |
download | logilab-common-8dd4d45de31cb7a519b6993bdc74f113fd8fe5a5.tar.gz |
fix backward compat for db/adbh
Diffstat (limited to 'adbh.py')
-rw-r--r-- | adbh.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -20,4 +20,12 @@ from warnings import warn warn('this module is deprecated, use logilab.db instead', DeprecationWarning, stacklevel=1) -from logilab.db import FunctionDescr, get_db_helper as get_adv_func_helper +from logilab.db import (FunctionDescr, get_db_helper as get_adv_func_helper, + _GenericAdvFuncHelper, + _ADV_FUNC_HELPER_DIRECTORY as ADV_FUNC_HELPER_DIRECTORY) +from logilab.common.decorators import monkeypatch + +@monkeypatch(_GenericAdvFuncHelper) +def func_sqlname(self, funcname): + funcdef = self.function_description(funcname) + return funcdef.name_mapping.get(self.backend_name, funcname) |