Skip to content

Commit 8939b2e

Browse files
Merge branch 'master' of github.com:sqlkata/docs
2 parents 9431b99 + fe2a464 commit 8939b2e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

where-string.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,14 @@ new Query("Posts").WhereLike("Title", "Book")
3636
SELECT * FROM "Posts" WHERE LOWER("Title") LIKE 'book'
3737
```
3838

39-
> **Note:** in `WhereLike` method, you have to put the wildcard `%` by yourself
39+
> **Note:** in `WhereLike` method, you have to put the wildcard `%` by yourself
40+
41+
You can also add an optional escape clause to all of the LIKE queries using the escapeCharacter argument:
42+
43+
```cs
44+
new Query("Posts").WhereLike("Title", @"%The \% Sign%", escapeCharacter=@"\")
45+
```
46+
47+
```sql
48+
SELECT * FROM "Posts" WHERE LOWER("Title") LIKE '%The \% Sign%' ESCAPE '\'
49+
```

0 commit comments

Comments
 (0)