|
64 | 64 | <br> |
65 | 65 | Returns a copy</tt></dd></dl> |
66 | 66 |
|
| 67 | +<dl><dt><a name="QueryableListBase-__copy__"><strong>__copy__</strong></a>(self)</dt><dd><tt>__copy__ - Make a copy of this collection</tt></dd></dl> |
| 68 | + |
67 | 69 | <dl><dt><a name="QueryableListBase-__getslice__"><strong>__getslice__</strong></a>(self, start, end)</dt><dd><tt>__getslice__ - Return a "slice" (subset) of the current collection.<br> |
68 | 70 | <br> |
69 | 71 | Returns a copy</tt></dd></dl> |
|
99 | 101 | <br> |
100 | 102 | Returns a copy</tt></dd></dl> |
101 | 103 |
|
102 | | -<dl><dt><a name="QueryableListBase-all"><strong>all</strong></a>(self)</dt><dd><tt>all - Returns all items in this collection, as the collection type (aka returns "self").<br> |
| 104 | +<dl><dt><a name="QueryableListBase-all"><strong>all</strong></a>(self)</dt><dd><tt>all - Returns all items in this collection, as the collection type (aka returns a copy of "self").<br> |
103 | 105 | <br> |
104 | 106 | This method is provided for method parity with ORMs that build a filter set with filter calls,<br> |
105 | 107 | and then execute with ".all" (like django or IndexedRedis).<br> |
|
109 | 111 | <br> |
110 | 112 | @return <self.<strong>__class__</strong>> - self</tt></dd></dl> |
111 | 113 |
|
| 114 | +<dl><dt><a name="QueryableListBase-count"><strong>count</strong></a>(self)</dt><dd><tt>count - Returns the number of items in this collection.<br> |
| 115 | + <br> |
| 116 | + This is the same as len(...), but is added to be compatible with many server-side ORMs which implement "count" as a function.<br> |
| 117 | + <br> |
| 118 | + @return <int> - Number of items in this collection</tt></dd></dl> |
| 119 | + |
112 | 120 | <dl><dt><a name="QueryableListBase-customFilter"><strong>customFilter</strong></a>(self, filterFunc)</dt><dd><tt>customFilter - Apply a custom filter to elements and return a QueryableList of matches<br> |
113 | 121 | <br> |
114 | 122 | @param filterFunc <lambda/function< - A lambda/function that is passed an item, and<br> |
|
134 | 142 | <br> |
135 | 143 | @return - A QueryableList object of the same type, with only the matching objects returned.</tt></dd></dl> |
136 | 144 |
|
| 145 | +<dl><dt><a name="QueryableListBase-sort_by"><strong>sort_by</strong></a>(self, fieldName, reverse=False)</dt><dd><tt>sort_by - Return a copy of this collection, sorted by the given fieldName.<br> |
| 146 | + <br> |
| 147 | + The fieldName is accessed the same way as other filtering, so it supports custom properties, etc.<br> |
| 148 | + <br> |
| 149 | + @param fieldName <str> - The name of the field on which to sort by<br> |
| 150 | + <br> |
| 151 | + @param reverse <bool> Default False - If True, <a href="builtins.html#list">list</a> will be in reverse order.<br> |
| 152 | + <br> |
| 153 | + @return <QueryableList> - A QueryableList of the same type with the elements sorted based on arguments.</tt></dd></dl> |
| 154 | + |
137 | 155 | <hr> |
138 | 156 | Data descriptors defined here:<br> |
139 | 157 | <dl><dt><strong>__dict__</strong></dt> |
|
190 | 208 |
|
191 | 209 | <dl><dt><a name="QueryableListBase-copy"><strong>copy</strong></a>(...)</dt><dd><tt>L.<a href="#QueryableListBase-copy">copy</a>() -> <a href="builtins.html#list">list</a> -- a shallow copy of L</tt></dd></dl> |
192 | 210 |
|
193 | | -<dl><dt><a name="QueryableListBase-count"><strong>count</strong></a>(...)</dt><dd><tt>L.<a href="#QueryableListBase-count">count</a>(value) -> integer -- return number of occurrences of value</tt></dd></dl> |
194 | | - |
195 | 211 | <dl><dt><a name="QueryableListBase-extend"><strong>extend</strong></a>(...)</dt><dd><tt>L.<a href="#QueryableListBase-extend">extend</a>(iterable) -> None -- extend <a href="builtins.html#list">list</a> by appending elements from the iterable</tt></dd></dl> |
196 | 212 |
|
197 | 213 | <dl><dt><a name="QueryableListBase-index"><strong>index</strong></a>(...)</dt><dd><tt>L.<a href="#QueryableListBase-index">index</a>(value, [start, [stop]]) -> integer -- return first index of value.<br> |
|
0 commit comments