[DOCS-932] Add documentation for fixed sized arrays Created: 01/Jan/13 Updated: 04/Mar/23 Resolved: 03/Jan/13 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | mongodb-2.4 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Sam Weaver | Assignee: | Sam Kleinman (Inactive) |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Participants: | |||||||||||||||||
| Days since reply: | 11 years, 7 weeks, 1 day ago | ||||||||||||||||
| Description |
|
From http://codereview.10gen.com/8998011/ { $push: { a: { $each: [ 1 2 3] } } } Syntax for creating a fixed sized array is: { $push: { a: { $each: [1], $trimTo: 5 }} } I.e after appending the elements in $each, we'd trim the resulting array to 5 elements. |