You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -113,9 +113,48 @@ This documentation primarily demonstrates use of the ESM and CommonJS builds of
113
113
114
114
:::
115
115
116
+
## Exporting queries
117
+
118
+
To convert a query object into other formats like [SQL](https://en.wikipedia.org/wiki/SQL), [MongoDB](https://www.mongodb.com/), and [CEL](https://github.com/google/cel-spec), you can use the `formatQuery` function ([full documentation here](./api/export)). The example below demonstrates the conversion of a query to its equivalent SQL form. Modify the query by manipulating the form elements and the SQL will update accordingly.
SQL as result of <code>formatQuery(query, 'sql')</code>:
146
+
</h4>
147
+
<pre>{formatQuery(query, 'sql')}</pre>
148
+
</>
149
+
);
150
+
};
151
+
```
152
+
153
+
</SandpackRQB>
154
+
116
155
## Onward and upward!
117
156
118
-
To discover all the options of React Query Builder, check out the [API documentation](./api/querybuilder). To play around with various configurations, check out the ["kitchen sink" demo](https://react-querybuilder.github.io/react-querybuilder/).
157
+
To discover all the options of React Query Builder, check out the [API documentation](./api/querybuilder). To play around with various configurations, including other export formats and [importing from SQL](./api/import), check out the ["kitchen sink" demo](https://react-querybuilder.js.org/react-querybuilder/).
0 commit comments