Skip to content

Commit

Permalink
chore: update the CHANGELOG, README and pyproject files
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaktb committed Jan 29, 2024
1 parent aa6cac7 commit c0785af
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
13 changes: 7 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
v0.3.1
======
## v0.3.5
- Added 'IN' and 'NOT IN' filter operations for interrogator

* Refactored how functions are looked up
* Added new aggregate/function register
* Added documentation for new functions
* Added CHANGELOG.md
## v0.3.1
- Refactored how functions are looked up
- Added new aggregate/function register
- Added documentation for new functions
- Added CHANGELOG.md
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ Cross-table comparisons in filters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Most django queries in filters match a field with a given string, however there are cases where you would like to compare values between columns. These can be achieved by using ``F()`` statements in django. A user can specify that a filter should compare columns with an ``F()`` statement by using a ``double equals`` in the filter. If for example, we wanted to see a list of officers *who had also been arrested* we could do this by filtering with ``name==arrest.perp_name`` which would be normalised in django to ``QuerySet.filter(name=F('perp_name'))``.
To look up a field in the list of values, we can use ``in``, which will be normalised to Django's ``__in`` filter. For example you would like to look for officers with precinct numbers 98 or 99. It's achievable with ``precinct.number in 98,99`` filter which normalised to django like ``Precinct.objects.filter(number__in=[98,99])``
To exclude values from the search we could use ``not in`` which will be normalised to django ``.exclude()`` filter. For example you would like to look for officers with captians other than captain 'Raymond Holt' or 'Brad Prechet', So we use: ``precinct.captain.name not in Raymond Holt,Brad Prechet`` filter which normalised to django ``Precinct.objects.exclude(captain__name__in=[Raymond Holt,Brad Prechet])``
Setting up a test environment
=============================
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-data-interrogator"
version = "0.3.4"
version = "0.3.5"
description = "A suite of interactive table builder utilities that create reports using efficient SQL queries"
authors = ["Aristotle Metadata Enterprises"]
license = "BSD-3-Clause"
Expand Down

0 comments on commit c0785af

Please sign in to comment.