summaryrefslogtreecommitdiff
path: root/adbh.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2010-03-09 10:38:29 +0100
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2010-03-09 10:38:29 +0100
commit8dd4d45de31cb7a519b6993bdc74f113fd8fe5a5 (patch)
tree8d161263e8a715ad0b64a17c6768b403b9d6c890 /adbh.py
parent98f8214fac4027c4b82e257b99af702236893d1f (diff)
downloadlogilab-common-8dd4d45de31cb7a519b6993bdc74f113fd8fe5a5.tar.gz
fix backward compat for db/adbh
Diffstat (limited to 'adbh.py')
-rw-r--r--adbh.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/adbh.py b/adbh.py
index 53064c0..0e104ba 100644
--- a/adbh.py
+++ b/adbh.py
@@ -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)