Skip to content

Commit 220db2d

Browse files
committed
better example section
1 parent b4d3465 commit 220db2d

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

content/docs/developer-resources/rest-apis/v3-where-clause.mdx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'REST APIs v3 where clause'
33
description: 'NocoDB REST API v3 where clause'
44
---
55

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.
77

88
## Comparison Operators
99

@@ -19,9 +19,20 @@ See [rest api](/docs/developer-resources/rest-apis#logical-operators)
1919

2020
## Wrapping with Quotes
2121

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")`
2429

2530
## Usage on v2 API
2631

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:
38+
`@("and", ("Category", "=", "Electronics"), ("Description", "like", "High-performance, water-resistant"))`

0 commit comments

Comments
 (0)