fix in-query result checks with grouping
closes racket/db#8 merge to release branch
This commit is contained in:
parent
922b5f06e9
commit
995f320918
|
@ -247,18 +247,17 @@
|
||||||
(let* ([check
|
(let* ([check
|
||||||
;; If grouping, can't check expected arity.
|
;; If grouping, can't check expected arity.
|
||||||
;; FIXME: should check header includes named fields
|
;; FIXME: should check header includes named fields
|
||||||
(cond [(null? grouping-fields) (or vars 'rows)]
|
(if (null? grouping-fields) vars #f)]
|
||||||
[else 'rows])]
|
[stmt (compose-statement 'in-query c stmt args (or check 'rows))])
|
||||||
[stmt (compose-statement 'in-query c stmt args check)])
|
|
||||||
(cond [(eqv? fetch-size +inf.0)
|
(cond [(eqv? fetch-size +inf.0)
|
||||||
(in-list/vector->values
|
(in-list/vector->values
|
||||||
(rows-result-rows
|
(rows-result-rows
|
||||||
(let ([result (query/rows c 'in-query stmt vars)])
|
(let ([result (query/rows c 'in-query stmt check)])
|
||||||
(if (null? grouping-fields)
|
(if (null? grouping-fields)
|
||||||
result
|
result
|
||||||
(group-rows-result* 'in-query result grouping-fields group-mode)))))]
|
(group-rows-result* 'in-query result grouping-fields group-mode)))))]
|
||||||
[else
|
[else
|
||||||
(let ([cursor (query/cursor c 'in-query stmt vars)])
|
(let ([cursor (query/cursor c 'in-query stmt check)])
|
||||||
(in-list-generator/vector->values
|
(in-list-generator/vector->values
|
||||||
(lambda () (send c fetch/cursor 'in-query cursor fetch-size))))])))
|
(lambda () (send c fetch/cursor 'in-query cursor fetch-size))))])))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user