From 4e927d3a50ab09a4d8c412b41258ec5236a8d842 Mon Sep 17 00:00:00 2001 From: Jake Boone Date: Mon, 4 Apr 2022 14:43:22 -0700 Subject: [PATCH] Add documentation on CEL export format --- docs/api/export.mdx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/api/export.mdx b/docs/api/export.mdx index f47e600c9a..d262a48a39 100644 --- a/docs/api/export.mdx +++ b/docs/api/export.mdx @@ -22,6 +22,7 @@ function formatQuery( - SQL `WHERE` clause - Parameterized SQL (with anonymous or named parameters) - MongoDB +- Common Expression Language (CEL) :::info @@ -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.