# HG changeset patch # User Sylvain Thénault # Date 1275482916 -7200 # Node ID 40d7c7e180f1375a82132bfd858193afc5782f5f # Parent 73e48b0c77c2047823b811ae80324f0f821b9075 [storage] source's callback has a new prototype, update usage diff -r 73e48b0c77c2 -r 40d7c7e180f1 cwconfig.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) diff -r 73e48b0c77c2 -r 40d7c7e180f1 server/sources/rql2sql.py --- 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