Skip to content

BeechCMS


BeechCMS / @beechcms/core / generateJunctionIndexes

Function: generateJunctionIndexes() ​

generateJunctionIndexes(seed, branch): string[]

Generates the two B-tree indexes for a junction table: one on parent_id (listing entries by parent) and one on target_id (handling cascade checks from target side).

Parameters ​

seed ​

Seed

The parent seed definition.

branch ​

Branch

The multi-relation branch definition.

Returns ​

string[]

An array of CREATE INDEX SQL statements.