supabase-rb-rb
Database

Match a Hash of column values

Apply an `eq` filter for every key/value pair in a Hash.

Shorthand that calls eq for each key in the supplied Hash. Saves typing when you want to match several columns with = simultaneously.

Signature

builder.match(query)

Parameters

NameTypeRequiredDescription
queryHashRequiredNon-empty hash of { column => value }. Each entry adds an eq filter. Raises ArgumentError if nil or empty.

Returns

Returns
self (FilterRequestBuilder)

The same builder for chaining (after applying every eq).

Example — match a composite of equalities

supabase
  .from("orders")
  .select("*")
  .match(status: "paid", currency: "USD", customer_id: 42)
  .execute

# Equivalent to:
# .eq("status", "paid").eq("currency", "USD").eq("customer_id", 42)

Example — single-key shorthand

supabase
  .from("users")
  .select("id, email")
  .match(role: "admin")
  .execute

Example — combine with non-eq filters

supabase
  .from("invoices")
  .select("*")
  .match(currency: "USD", paid: true)
  .gte("issued_at", "2026-01-01")
  .execute

Raises ArgumentError on an empty or nil argument. Each key produces one column=eq.value query-string entry.

On this page