code: private function doDeleteTransaction(int $permissionId)
      {
          pg_query("BEGIN");
          // $this->doDeletePermissionRoles($permissionId);
  
          try {
              $this->doDeletePermissionRoles($permissionId);
          } catch (\Exception $e) {
              pg_query("ROLLBACK");
              throw $e;
          }
  
          try {
              $this->permissionsTableMapper->delete($permissionId);
          } catch (\Exception $e) {
              pg_query("ROLLBACK");
              throw $e;
          }
          // $this->permissionsTableMapper->delete($permissionId);
          pg_query("COMMIT");
      }
docs: any necessary validation should be performed prior to calling