With a common element

  • .overlaps() can work on array columns or range columns.

    1.overlaps('arraycol',["a","b"]) // You can use a javascript array for an array column
    2.overlaps('arraycol','{"a","b"}') // You can use a string with Postgres array {} for array column.
    3.overlaps('rangecol','(1,2]') // Use Postgres range syntax for range column.
    4.overlaps('rangecol',`(${arr}]`)  // You can insert an array into a string.

const { data, error } = await supabase
  .select('name, id, main_exports')
  .overlaps('main_exports', ['computers', 'minerals'])