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