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
Copy file name to clipboardExpand all lines: content/docs/developer-resources/rest-apis/v3-where-clause.mdx
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: 'REST APIs v3 where clause'
3
3
description: 'NocoDB REST API v3 where clause'
4
4
---
5
5
6
-
This is a detailed information on v3 where clause, accessed during [rest api](/docs/developer-resources/rest-apis) call.
6
+
The v3 `where` clause in NocoDB REST API calls offers enhanced flexibility and robustness for querying data, particularly when dealing with complex conditions and special characters. This document provides detailed information on its usage, highlighting improvements over previous versions.
7
7
8
8
## Comparison Operators
9
9
@@ -19,9 +19,20 @@ See [rest api](/docs/developer-resources/rest-apis#logical-operators)
19
19
20
20
## Wrapping with Quotes
21
21
22
-
v3 where clause can be wrapped with quotes in order to use special characters that can break older version where clause.
23
-
For example: `("My Field", like, "Let's come home, and go straight to bed")` search value is now valid to use.
22
+
The v3 `where` clause allows values to be wrapped with quotes to safely use special characters that might otherwise break older version `where` clauses. This is particularly useful for strings containing commas, parentheses, or other delimiters.
23
+
24
+
**Example:** Searching for a phrase with special characters:
25
+
`("My Field", "like", "Let's come home, and go straight to bed")`
26
+
27
+
**Another Example:** Searching for a value that includes a comma:
28
+
`("Product Name", "=", "Laptop, 15-inch")`
24
29
25
30
## Usage on v2 API
26
31
27
-
v3 where clause can be utilized when using v2 api, by prepending the where clause with `@` sign. For example: `@(Title,not,blank)` will utilize v3 where clause.
32
+
The v3 `where` clause can also be utilized when using the v2 API by prepending the `where` clause with an `@` sign. This allows you to leverage the advanced capabilities of the v3 `where` clause even in v2 API calls.
33
+
34
+
**Example:** Using a v3 `where` clause to check for non-blank titles in a v2 API call:
35
+
`@("Title", "not", "blank")`
36
+
37
+
**Another Example:** Combining multiple conditions with special characters in a v2 API call:
0 commit comments