function nameSource
nameSource<Raw>(
table: string,
alias: string,
nameColumn: string,
decryptName: Decryptor<Raw>,
): unknown

A table's id → name projection, bound to its columns once. byIds returns the map for the requested ids (empty ids ⇒ empty map); all returns it for every row, ordered by id. Only the name column is decrypted, via the decryption-agnostic decryptName; table/alias/nameColumn (alias qualifies the selected columns, repo SQL convention) are internal constants.

This is the single home for narrow id→name reads that skip the full-row cache: the per-table getXNamesByIds wrappers bind it and expose .byIds, and the pickers/labels that need every name call .all().

Type Parameters

Raw

Parameters

table: string
alias: string
nameColumn: string
decryptName: Decryptor<Raw>

Return Type

unknown

Usage

import { nameSource } from "docs/database.ts";