prorm API Reference
    Preparing search index...

    Function notExists

    • Helper to create NOT EXISTS condition for anti-joins Returns records where the subquery returns no rows

      Parameters

      • subquery: string | { $literal: string }

      Returns Record<string, any>

      // Find users with no orders
      User.findAll({
      where: notExists('SELECT 1 FROM orders WHERE orders.user_id = users.id')
      })