Database
Column matches a pattern
Case-sensitive pattern match using SQL LIKE.
Filter rows where column LIKE pattern. Case-sensitive. Use % for any-string and _ for any-single-char.
Signature
builder.like(column, pattern)Parameters
| Name | Type | Required | Description |
|---|---|---|---|
column | String / Symbol | Required | Column name. |
pattern | String | Required | SQL LIKE pattern. % matches any sequence, _ matches one character. Case-sensitive — use ilike for case-insensitive. |
Returns
Returns
self (FilterRequestBuilder)
The same builder for chaining.
Example — prefix match
supabase
.from("countries")
.select("name")
.like("name", "United%")
.execute
# => [{ "name" => "United Kingdom" }, { "name" => "United States" }]Example — suffix match
supabase
.from("files")
.select("path")
.like("path", "%.pdf")
.executeExample — substring match
supabase
.from("posts")
.select("title")
.like("title", "%Ruby%")
.executeCase-sensitive — use ilike for the case-insensitive variant.