Skip to content
Merged
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
15 changes: 15 additions & 0 deletions docs/api/export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function formatQuery(
- SQL `WHERE` clause
- Parameterized SQL (with anonymous or named parameters)
- MongoDB
- Common Expression Language (CEL)

:::info

Expand Down Expand Up @@ -168,6 +169,20 @@ Output:
`{"$and":[{"firstName":{"$eq":"Steve"}},{"lastName":{"$eq":"Vai"}}]}`;
```

### Common Expression Language

For Common Expression Language (CEL) output, use the "cel" format.

```ts
formatQuery(query, 'cel');
```

Output:

```ts
`firstName = "Steve" && lastName = "Vai"`;
```

## Configuration

An object can be passed as the second argument instead of a string in order to have more detailed control over the output.
Expand Down