Show More
@@ -107,9 +107,9 b' class CachingQuery(Query):' | |||||
107 | cache.put(cache_key, value) |
|
107 | cache.put(cache_key, value) | |
108 |
|
108 | |||
109 |
|
109 | |||
110 | def query_callable(manager): |
|
110 | def query_callable(manager, query_cls=CachingQuery): | |
111 | def query(*arg, **kw): |
|
111 | def query(*arg, **kw): | |
112 |
return |
|
112 | return query_cls(manager, *arg, **kw) | |
113 | return query |
|
113 | return query | |
114 |
|
114 | |||
115 |
|
115 | |||
@@ -274,10 +274,8 b' def _params_from_query(query):' | |||||
274 |
|
274 | |||
275 | """ |
|
275 | """ | |
276 | v = [] |
|
276 | v = [] | |
277 |
|
||||
278 | def visit_bindparam(bind): |
|
277 | def visit_bindparam(bind): | |
279 | value = query._params.get(bind.key, bind.value) |
|
278 | value = query._params.get(bind.key, bind.value) | |
280 |
|
||||
281 | # lazyloader may dig a callable in here, intended |
|
279 | # lazyloader may dig a callable in here, intended | |
282 | # to late-evaluate params after autoflush is called. |
|
280 | # to late-evaluate params after autoflush is called. | |
283 | # convert to a scalar value. |
|
281 | # convert to a scalar value. | |
@@ -286,5 +284,7 b' def _params_from_query(query):' | |||||
286 |
|
284 | |||
287 | v.append(value) |
|
285 | v.append(value) | |
288 | if query._criterion is not None: |
|
286 | if query._criterion is not None: | |
289 |
visitors.traverse(query._criterion, {}, {'bindparam': |
|
287 | visitors.traverse(query._criterion, {}, {'bindparam':visit_bindparam}) | |
|
288 | for f in query._from_obj: | |||
|
289 | visitors.traverse(f, {}, {'bindparam':visit_bindparam}) | |||
290 | return v |
|
290 | return v |
General Comments 0
You need to be logged in to leave comments.
Login now