Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/querying/rql/what-is-rql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,11 @@ where Lines[].ProductName in ("Chang", "Spegesild", "Unknown product name")

---

**To negate an `in` condition**, use the `NOT` operator. In RQL, `NOT` cannot start a `where` clause; it must follow a **valid preceding expression.**
**To negate an `in` condition**, use the `NOT` operator.
In RQL, `NOT` cannot start a `where` clause; it must follow a **valid preceding expression.**

To ensure accuracy, especially when fields might be missing from some documents, use `exists(fieldName)` as the anchor:
To ensure accuracy, especially when fields might be missing from some documents,
use `exists(fieldName)` as the anchor:

<TabItem>
```csharp
Expand All @@ -369,8 +371,9 @@ where exists(Name) and NOT Name in ("The Big Cheese", "The Cracker Box")
```
</TabItem>

**Note:** Avoid using `where true` or an `exists()` check on a *different* field. If a document is missing the field you're
filtering on, these anchors may return unexpected results.
**Note:**
Avoid using `where true` or an `exists()` check on a *different* field.
If a document is missing the field you're filtering on, these anchors may return unexpected results.

</ContentFrame>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,13 @@ where PricePerUnit >= 10.5 and PricePerUnit <= 13.0 // Using >= and <=
</TabItem>

</Admonition>

<Admonition type="note" title="">

#### Operator: &nbsp;&nbsp; `in`

The operator `in` is validating if a given field contains passed values.
It will return results if a given field matches **any** of the passed values.
The `in` operator evaluates a field against a list of values.
It will return results if the field matches **any** of the items in that list.

<TabItem value="csharp" label="csharp">
<CodeBlock language="csharp">
Expand All @@ -369,8 +370,28 @@ where Lines[].ProductName in ("Chang", "Spegesild", "Unknown product name")
`}
</CodeBlock>
</TabItem>

---

**To negate an `in` condition**, use the `NOT` operator.
In RQL, `NOT` cannot start a `where` clause; it must follow a **valid preceding expression.**

To ensure accuracy, especially when fields might be missing from some documents,
use `exists(fieldName)` as the anchor:

<TabItem>
```csharp
from "Companies"
where exists(Name) and NOT Name in ("The Big Cheese", "The Cracker Box")
```
</TabItem>

**Note:**
Avoid using `where true` or an `exists()` check on a *different* field.
If a document is missing the field you're filtering on, these anchors may return unexpected results.

</Admonition>

<Admonition type="note" title="">

#### Operator: &nbsp;&nbsp; `all in`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,13 @@ where PricePerUnit >= 10.5 and PricePerUnit <= 13.0 // Using >= and <=
</TabItem>

</Admonition>

<Admonition type="note" title="">

#### Operator: &nbsp;&nbsp; `in`

The operator `in` is validating if a given field contains passed values.
It will return results if a given field matches **any** of the passed values.
The `in` operator evaluates a field against a list of values.
It will return results if the field matches **any** of the items in that list.

<TabItem value="csharp" label="csharp">
<CodeBlock language="csharp">
Expand All @@ -370,8 +371,28 @@ where Lines[].ProductName in ("Chang", "Spegesild", "Unknown product name")
`}
</CodeBlock>
</TabItem>

---

**To negate an `in` condition**, use the `NOT` operator.
In RQL, `NOT` cannot start a `where` clause; it must follow a **valid preceding expression.**

To ensure accuracy, especially when fields might be missing from some documents,
use `exists(fieldName)` as the anchor:

<TabItem>
```csharp
from "Companies"
where exists(Name) and NOT Name in ("The Big Cheese", "The Cracker Box")
```
</TabItem>

**Note:**
Avoid using `where true` or an `exists()` check on a *different* field.
If a document is missing the field you're filtering on, these anchors may return unexpected results.

</Admonition>

<Admonition type="note" title="">

#### Operator: &nbsp;&nbsp; `all in`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,15 @@ where PricePerUnit >= 10.5 and PricePerUnit <= 13.0 // Using >= and <=
`}
</CodeBlock>
</TabItem>

</Admonition>

<Admonition type="note" title="">

#### Operator: &nbsp;&nbsp; `in`

The operator `in` is validating if a given field contains passed values.
It will return results if a given field matches **any** of the passed values.
The `in` operator evaluates a field against a list of values.
It will return results if the field matches **any** of the items in that list.

<TabItem value="csharp" label="csharp">
<CodeBlock language="csharp">
Expand All @@ -370,8 +371,28 @@ where Lines[].ProductName in ("Chang", "Spegesild", "Unknown product name")
`}
</CodeBlock>
</TabItem>

---

**To negate an `in` condition**, use the `NOT` operator.
In RQL, `NOT` cannot start a `where` clause; it must follow a **valid preceding expression.**

To ensure accuracy, especially when fields might be missing from some documents,
use `exists(fieldName)` as the anchor:

<TabItem>
```csharp
from "Companies"
where exists(Name) and NOT Name in ("The Big Cheese", "The Cracker Box")
```
</TabItem>

**Note:**
Avoid using `where true` or an `exists()` check on a *different* field.
If a document is missing the field you're filtering on, these anchors may return unexpected results.

</Admonition>

<Admonition type="note" title="">

#### Operator: &nbsp;&nbsp; `all in`
Expand Down
Loading