- 3.1.0 - Apr 23 2017
-
Add "sort_by" method, which allows returning a sorted copy of the
collection, using the same field access _get_item_value already defined. -
Add "count" method to return the number of items in the collection (same as
len), which matches the interface on a lot of server-side filtering ORMs, to
increase the compatability between the two. -
Make "all()" method return a copy of the collection (but same elements)
-
Implement "copy" to do the same as "all()", leaving deepcopy to create
copy of both the collection AND the elements within it -
Load latest "runTests.py" from GoodTests.py. It is recommended that you
delete the local copy and let it download the latest GoodTests.py if you run
unit tests. -
Some more unit tests
- 3.0.1 - Apr 06 2017
- Fix MANIFEST.in to include ChangeLog properly and also include the unit tests
- 3.0.0 - Apr 03 2017
-
Fix iadd ( += )to not make a copy, but to just inline update the list.
Previously it was updating the list inline, so references and such
functionally the same, but it made a copy after the inline update (so the id
would change). Used more memory, more cpu, so fix that to just do inline. -
Implement isub method ( -= ) to substract elements frm the current list,
i.e. not make a copy -
Update sub and impelment in isub a change in behaviour, previously
if we subtracted two lists and they contained common elements, we would only
remove the FIRST instance of that element found (so QL['a', 'b', 'a'] -
QL['a'] would equal ['b', 'a']). This has been updated to remove ALL
references, (so QL['a', 'b', 'a'] - QL['a'] now will equal ['b']). I think
this makes a lot more sense. -
Document how easy and cool it is to extend QueryableList to add filtering
capabilities to collections of your own custom modules -
Add some missing docstrings, add some more comments. Remove the copy of
README that was in the QueryableList.init module docstring, too many
copies to manage! -
Update the static copy of FILTER_TYPES to when unrolling filters to use a dict comprehension
-
Update QueryBuilder with "addFilterAnd" and "addFilterOr" methods, as alias
to "addFilter" with the filterType defined accordingly. -
Add "customFilter" method which allows passing in a lambda to match on elements
-
Add a "customMatch" operation (like fieldName__customMatch=lambda x : x.isMatch()) which can take a lambda or function and match based on the results of its return
-
Added experimental (default disabled) value-cache impl. You can enable it by:
import QueryableList.Base as QLB
QLB.USE_CACHED = True
Performance is not improved for normal queries (a few params to filter), but for abnormally large queries with multiples on the same field, where field access is a property that could be expensive to calculate, this may improve things. -
Add test for operators, ( like +, -, +=, etc. )
-
Add some tests that seem to have been accidently not committed which tast
basic operation -
Add test for Operations. Implement a few of them, eventually will want to
have all operations here (eq, ne, contains, etc) -
Add/Transfer some common testing stuff into "tutils.py" test class