[storage] source's callback has a new prototype, update usage stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 02 Jun 2010 14:48:36 +0200
branchstable
changeset 5630 40d7c7e180f1
parent 5629 73e48b0c77c2
child 5631 e2e99cdf0899
[storage] source's callback has a new prototype, update usage
cwconfig.py
server/sources/rql2sql.py
--- a/cwconfig.py	Wed Jun 02 14:36:54 2010 +0200
+++ b/cwconfig.py	Wed Jun 02 14:48:36 2010 +0200
@@ -1156,7 +1156,7 @@
         def as_sql(self, backend, args):
             raise NotImplementedError('source only callback')
 
-        def source_execute(self, source, value):
+        def source_execute(self, source, session, value):
             fpath = source.binary_to_str(value)
             try:
                 return Binary(fpath)
--- a/server/sources/rql2sql.py	Wed Jun 02 14:36:54 2010 +0200
+++ b/server/sources/rql2sql.py	Wed Jun 02 14:48:36 2010 +0200
@@ -72,7 +72,7 @@
 FunctionDescr.update_cb_stack = default_update_cb_stack
 
 LENGTH = SQL_FUNCTIONS_REGISTRY.get_function('LENGTH')
-def length_source_execute(source, value):
+def length_source_execute(source, session, value):
     return len(value.getvalue())
 LENGTH.source_execute = length_source_execute