@earth-app/collegedb
    Preparing search index...

    Function buildDelete

    • Builds a DELETE statement scoped by a WHERE map.

      The WHERE map is required; an empty condition throws rather than emit an unfiltered DELETE that would clear the table.

      Parameters

      • table: string

        Target table name

      • where: ColumnValues

        Column to value equality conditions (at least one)

      Returns BuiltQuery

      The parameterized SQL and its bindings

      If no WHERE conditions are provided

      const { sql, bindings } = buildDelete('users', { id: 'u1' });
      // sql: DELETE FROM "users" WHERE "id" = ?
      // bindings: ['u1']