Skip to main content

Function: mapModuleIdentity()

mapModuleIdentity(row): ModuleIdentityData

Defined in: Data/Repositories/BaseModuleRepository.ts:39

Map the v2 identity + provenance block off a module_info row.

Spread the result into a module-info constructor so every module type picks up the block with one call:

return new BibleModuleInfo({ ...mapModuleIdentity(row), abbreviation: row.abbreviation, ... });

v1 COMPAT: shipped modules have none of these columns, so every field comes back undefined and BaseModuleInfo falls back to v1 behaviour. This function needs no schema probe — a missing column simply reads as undefined from SELECT *. Pass-2 note: the function survives Pass 2; only the fallbacks inside BaseModuleInfo go away.

Parameters

row

ModuleInfoRow

Returns

ModuleIdentityData