Evalkeeper
    Preparing search index...

    Function deleteScopedRows

    • Deletes the rows a scoped store contract wrote, and nothing else: cases and tests whose suite starts with scope (with their answers and outputs), and ratings, versions, live pointers, and changes whose feature starts with it. Each row's name is compared exactly in code, not by the database's pattern matching (which may ignore case), so a row whose name only looks like the scope stays. Tables your client doesn't have (feedback, settings) are skipped.

      Parameters

      • db: object

        Your Prisma client.

      • scope: string

        The prefix the contracts used, such as "contract-".

      • maps: ScopedRowsMaps = {}

        The maps you pass the stores, if your tables are your own.

      Returns Promise<ScopedRowsDeleted>

      describeStoreContract("our tables", () => prismaStore(prisma, map), {
      scope: "contract-",
      cleanup: (scope) => deleteScopedRows(prisma, scope, { map }),
      });