Skip to content

Commit

Permalink
fix: document empty set behavior. (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
SandPod authored Mar 27, 2024
1 parent 5d9ba65 commit 14d6b2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions docs/05-concepts/06-database/06-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ await User.db.find(
);
```

In the example we fetch all users with a name matching either Alice or Bob.
In the example we fetch all users with a name matching either Alice or Bob. If an empty set is used as an argument for the inSet comparison, no rows will be included in the result.

The 'not in set' operation functions similarly to `inSet`, but it negates the condition.

Expand All @@ -107,7 +107,8 @@ await User.db.find(
where: (t) => t.name.notInSet({'Alice', 'Bob'})
);
```
In the example we fetch all users with a name not matching Alice or Bob. Rows with a `null` value in the column will be included in the result.
In the example we fetch all users with a name not matching Alice or Bob. Rows with a `null` value in the column will be included in the result. If an empty set is used as an argument for the notInSet comparison, all rows will be included in the result.


### Like

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ await User.db.find(
);
```

In the example we fetch all users with a name matching either Alice or Bob.
In the example we fetch all users with a name matching either Alice or Bob. If an empty set is used as an argument for the inSet comparison, no rows will be included in the result.

The 'not in set' operation functions similarly to `inSet`, but it negates the condition.

Expand All @@ -107,7 +107,7 @@ await User.db.find(
where: (t) => t.name.notInSet({'Alice', 'Bob'})
);
```
In the example we fetch all users with a name not matching Alice or Bob. Rows with a `null` value in the column will be included in the result.
In the example we fetch all users with a name not matching Alice or Bob. Rows with a `null` value in the column will be included in the result. If an empty set is used as an argument for the notInSet comparison, all rows will be included in the result.

### Like

Expand Down

0 comments on commit 14d6b2c

Please sign in to comment.