.cs()

Finds all rows whose json, array, or range value on the stated column contains the values specified in value.

const { data, error } = await supabase
.from('countries')
.select('name, id, main_exports')
.cs('main_exports', ['oil'])

Parameters

  • columnrequiredobject

    The column to filter on.

  • valuerequired| |

    The value to filter with.

Examples

With select()

const { data, error } = await supabase
.from('countries')
.select('name, id, main_exports')
.cs('main_exports', ['oil'])

With update()

const { data, error } = await supabase
.from('countries')
.update({ name: 'Mordor' })
.cs('main_exports', ['oil'])

With delete()

const { data, error } = await supabase
.from('countries')
.delete()
.cs('main_exports', ['oil'])

With rpc()

// Only valid if the Stored Procedure returns a table type.
const { data, error } = await supabase
.rpc('echo_all_countries')
.cs('main_exports', ['oil'])