Look up the zero-based index of a named schema column.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_dt_column_index

Purpose

Look up the zero-based index of a named schema column.

Arguments

  • $1 — Pipe-delimited schema.
  • $2 — Column name to find (exact match).

Output

Writes the numeric column index to stdout.

Returns

  • 0 when found; 1 when the column is absent.

Usage

  sgnd_dt_column_index "name|role" "role"