Ticket #504 (closed defect: invalid)

Opened 11 years ago

Last modified 11 years ago

keyword #:limit of function mongo-collection-find doesn't work

Reported by: highfly22@… Owned by: jaymccarthy
Priority: major Milestone:
Component: jaymccarthy/mongodb.plt Keywords:
Cc: Version: (1 12)
Racket Version:


(define c (mongo-collection-find collection (hasheq) #:selector (hasheq '|_id| 0) #:skip 10 #:limit 10))

(for/sum ([i c]) 1)


the cursor returns all the results

(mongo-cursor-done? c) always trues

Change History

Changed 11 years ago by jaymccarthy

  • status changed from new to closed
  • resolution set to invalid

That's not the semantics that MongoDB gives to limit. The limit argument just specifies how many elements (add most, i.e. limited to) to include in the first response from the server. If you want to limit a sequence in Racket to some number, then combine it with (in-range N) for a limit of N.Fl

Note: See TracTickets for help on using tickets.