Entities/Administrators/Model/AdministratorsEntityMapper.php
private function doDeleteTransaction(int $administratorId)
    {
        pg_query("BEGIN");
        try {
            $this->doDeleteAdministratorRoles($administratorId);
        } catch (\Exception $e) {
            pg_query("ROLLBACK");
            throw $e;
        } 
        try {
            $this->administratorsTableMapper->delete($administratorId);
        } catch (\Exception $e) {
            pg_query("ROLLBACK");
            throw $e;
        } 
        pg_query("COMMIT");
    }
private function doDeleteTransaction(int $administratorId)
    {
        pg_query("BEGIN");
        try {
            $this->doDeleteAdministratorRoles($administratorId);
        } catch (\Exception $e) {
            pg_query("ROLLBACK");
            throw $e;
        } 
        try {
            $this->administratorsTableMapper->delete($administratorId);
        } catch (\Exception $e) {
            pg_query("ROLLBACK");
            throw $e;
        } 
        pg_query("COMMIT");
    }
any necessary validation should be performed prior to calling