json-fs-query
    Preparing search index...

    Function foreignKeyExists

    • Check whether any record in the referenced entity has the given property set to the given value - the mirror image of keyUnique(), which checks that no record already has a value. A referenced field with an index (a foreign key usually references a primary key) is answered from it; otherwise every row is read.

      Parameters

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

      Returns Promise<boolean>