[SERVER-1041] Add option to set default limit on find in shell Created: 22/Apr/10 Updated: 12/Jul/16 Resolved: 23/Apr/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | 1.5.1 |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Dave Syer | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
The default limit for find in the shell is apparently 20, which is a nice default, but if I am just browsing / experimenting with the shell it tends to mean that the data scrolls off the top of the terminal and I can't see the command I just wrote. Apparently the protocol supports setting the limit per request, so that would work per client as well. |
| Comments |
| Comment by auto [ 23/Apr/10 ] |
|
Author: {'login': 'erh', 'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}Message: control shell batch size DBQuery.shellBatchSize = 2 |
| Comment by Eliot Horowitz (Inactive) [ 23/Apr/10 ] |
|
> DBQuery.shellBatchSize = 2 |
| Comment by Dave Syer [ 23/Apr/10 ] |
|
Yeah, that must be it. The batch size. Didn't know what to call it. |
| Comment by Eliot Horowitz (Inactive) [ 23/Apr/10 ] |
|
Do you mean the display batch size? If so - yes, that's pretty easy to make configurable. |
| Comment by Dave Syer [ 22/Apr/10 ] |
|
That wasn't what I meant (so it doesn't work as designed). Matthias just said it was easy to do this. If it isn't then fine. |
| Comment by Eliot Horowitz (Inactive) [ 22/Apr/10 ] |
|
you can use .limit so db.foo.find().limit(5) |