Skip to content

Commit

Permalink
Merge pull request #1804 from strapi/dev/rest-nei-filter
Browse files Browse the repository at this point in the history
Add `nei` filter operator to REST API docs
  • Loading branch information
meganelacheny authored Aug 2, 2023
2 parents 1be2ea3 + 58ff611 commit 4a2d2a3
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docusaurus/docs/dev-docs/api/entity-service/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,22 @@ const entries = await strapi.entityService.findMany('api::article.article', {
});
```

### `$nei`

Attribute does not equal input value (case-insensitive).

**Example**

```js
const entries = await strapi.entityService.findMany('api::article.article', {
filters: {
title: {
$nei: 'abcd',
},
},
});
```

### `$in`

Attribute is contained in the input list.
Expand Down
16 changes: 16 additions & 0 deletions docusaurus/docs/dev-docs/api/query-engine/filtering.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,22 @@ const entries = await strapi.db.query('api::article.article').findMany({
});
```

### `$nei`

Attribute does not equal input value (case-insensitive).

**Example**

```js
const entries = await strapi.db.query('api::article.article').findMany({
where: {
title: {
$nei: 'abcd',
},
},
});
```

### `$in`

Attribute is contained in the input list.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ The following operators are available:
| `$eq` | Equal |
| `$eqi` | Equal (case-insensitive) |
| `$ne` | Not equal |
| `$nei` | Not equal (case-insensitive) |
| `$lt` | Less than |
| `$lte` | Less than or equal to |
| `$gt` | Greater than |
Expand Down

1 comment on commit 4a2d2a3

@vercel
Copy link

@vercel vercel bot commented on 4a2d2a3 Aug 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

documentation – ./

documentation-strapijs.vercel.app
docs-vercel-v4.strapi.io
documentation-git-main-strapijs.vercel.app

Please sign in to comment.