Test whether any row matches a column value.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_dt_has_row

Purpose

Test whether any row matches a column value.

Arguments

  • $1 — Schema.
  • $2 — Name of the indexed array holding table rows.
  • $3 — Column name.
  • $4 — Value to match exactly.

Returns

  • 0 when a matching row exists; 1 otherwise.

Usage

  rows=("Ada|admin" "Lin|viewer")
  sgnd_dt_has_row "name|role" rows role admin