json-fs-query
    Preparing search index...

    Function hasDependents

    • Check whether any other record, in any entity, still has a single-field foreign key pointing at entity.property = value - the mirror image of foreignKeyExists(), which checks the opposite direction (that a new/updated foreign key value points at something real). Used to RESTRICT a delete or update that would otherwise leave a dangling reference behind. Looks at every record in the database (via the __RECORDS registry) for a foreign key to entity.property. A foreign key field with an index (each one gets one) is answered from it; otherwise that record's rows are read.

      Parameters

      • entity: string
      • property: string
      • value: any

      Returns Promise<boolean>