Skip to content

Commit

Permalink
Merge pull request #61 from collerek/fk_queryset
Browse files Browse the repository at this point in the history
Expose QuerysetProxy on reverse ForeignKey, add more QuerySet methods to QuerysetProxy
  • Loading branch information
collerek authored Dec 1, 2020
2 parents b939a02 + 3ac767e commit cbd793c
Show file tree
Hide file tree
Showing 20 changed files with 944 additions and 122 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ assert len(tracks) == 1
* `bulk_create(objects: List[Model]) -> None`
* `bulk_update(objects: List[Model], columns: List[str] = None) -> None`
* `delete(each: bool = False, **kwargs) -> int`
* `all(self, **kwargs) -> List[Optional[Model]]`
* `all(**kwargs) -> List[Optional[Model]]`
* `filter(**kwargs) -> QuerySet`
* `exclude(**kwargs) -> QuerySet`
* `select_related(related: Union[List, str]) -> QuerySet`
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ assert len(tracks) == 1
* `bulk_create(objects: List[Model]) -> None`
* `bulk_update(objects: List[Model], columns: List[str] = None) -> None`
* `delete(each: bool = False, **kwargs) -> int`
* `all(self, **kwargs) -> List[Optional[Model]]`
* `all(**kwargs) -> List[Optional[Model]]`
* `filter(**kwargs) -> QuerySet`
* `exclude(**kwargs) -> QuerySet`
* `select_related(related: Union[List, str]) -> QuerySet`
Expand Down
4 changes: 2 additions & 2 deletions docs/queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Return number of rows deleted.

### all

`all(self, **kwargs) -> List[Optional["Model"]]`
`all(**kwargs) -> List[Optional["Model"]]`

Returns all rows from a database for given model for set filter options.

Expand Down Expand Up @@ -212,7 +212,7 @@ You can use special filter suffix to change the filter operands:

* exact - like `album__name__exact='Malibu'` (exact match)
* iexact - like `album__name__iexact='malibu'` (exact match case insensitive)
* contains - like `album__name__conatins='Mal'` (sql like)
* contains - like `album__name__contains='Mal'` (sql like)
* icontains - like `album__name__icontains='mal'` (sql like case insensitive)
* in - like `album__name__in=['Malibu', 'Barclay']` (sql in)
* gt - like `position__gt=3` (sql >)
Expand Down
Loading

0 comments on commit cbd793c

Please sign in to comment.