id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	planetversion	pltversion
294	#:limit values other than 1 return the whole collection in mongo-collection-find	joe@…	jaymccarthy	"Code describes the problem better than I can (or do let me know if I'm missing something):

{{{

(require (planet ""main.rkt"" (""jaymccarthy"" ""mongodb.plt"" 1 5)))

(define m (create-mongo))
(define d (make-mongo-db m ""TEST""))

(current-mongo-db d)

(define-mongo-struct link ""links""
  ([url #:required]))

(mongo-db-drop-collection! d ""links"")

(define l1 (make-link #:url ""www.google.com""))
(define l2 (make-link #:url ""www.foozle.com""))
(define l3 (make-link #:url ""www.bing.com""))
(define l4 (make-link #:url ""www.bing2.com""))

(length (for/list ((l (mongo-collection-find (make-mongo-collection d ""links"") #hasheq() #:limit 1))) l))
;; returns 1
(length (for/list ((l (mongo-collection-find (make-mongo-collection d ""links"") #hasheq() #:limit 2))) l))
;; returns 4
(length (for/list ((l (mongo-collection-find (make-mongo-collection d ""links"") #hasheq() #:limit 3))) l))
;; returns 4
(length (for/list ((l (mongo-collection-find (make-mongo-collection d ""links"") #hasheq() #:limit 4))) l))
;; returns 4
}}}
"	defect	closed	minor		jaymccarthy/mongodb.plt	fixed			(1 5)	5.0
