.cd()

Finds all rows whose json, array, or range value on the stated column is contained by the specified value.

const { data, error } = await supabase
.from('countries')
.select('name, id, main_exports')
.cd('main_exports', ['cars', 'food', 'machine'])

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')
.cd('main_exports', ['cars', 'food', 'machine'])

With update()

const { data, error } = await supabase
.from('countries')
.update({ name: 'Mordor' })
.cd('main_exports', ['orks', 'surveillance', 'evil'])

With delete()

const { data, error } = await supabase
.from('countries')
.delete()
.cd('main_exports', ['cars', 'food', 'machine'])

With rpc()

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