Skip to main content

.like()

Finds all rows whose value in the stated column matches the supplied pattern (case sensitive).

final res = await supabase
.from('cities')
.select('name, country_id')
.like('name', '%la%')
.execute();

Parameters

  • columnrequiredobject

    The column to filter on.

  • patternrequiredstring

    The pattern to filter with.

Examples

With select()

final res = await supabase
.from('cities')
.select('name, country_id')
.like('name', '%la%')
.execute();

With update()

final res = await supabase
.from('cities')
.update({ 'name': 'Mordor' })
.like('name', '%la%')
.execute();

With delete()

final res = await supabase
.from('cities')
.delete()
.like('name', '%la%')
.execute();

With rpc()

// Only valid if the Stored Procedure returns a table type.
final res = await supabase
.rpc('echo_all_cities')
.like('name', '%la%')
.execute();