original_string: private function getBlobTableWhereExpr($oldNumericTables, $table)
      {
          $where = "";
          if (!empty($this->reportPeriodsToKeep)) // if keeping reports
          {
              $where = "period NOT IN (" . implode(',', $this->reportPeriodsToKeep) . ")";
  
              // if not keeping segments make sure segments w/ kept periods are also deleted
              if (!$this->keepSegmentReports) {
                  $this->findSegmentArchives($oldNumericTables);
  
                  $dateFromTable = ArchiveTableCreator::getDateFromTableName($table);
  
                  if (!empty($this->segmentArchiveIds[$dateFromTable])) {
                      $archiveIds = $this->segmentArchiveIds[$dateFromTable];
                      $where     .= " OR idarchive IN (" . implode(',', $archiveIds) . ")";
                  }
              }
  
              $where = "($where)";
          }
          return $where;
      }
code: private function getBlobTableWhereExpr($oldNumericTables, $table)
      {
          $where = "";
          if (!empty($this->reportPeriodsToKeep)) // if keeping reports
          {
              $where = "period NOT IN (" . implode(',', $this->reportPeriodsToKeep) . ")";
  
              // if not keeping segments make sure segments w/ kept periods are also deleted
              if (!$this->keepSegmentReports) {
                  $this->findSegmentArchives($oldNumericTables);
  
                  $dateFromTable = ArchiveTableCreator::getDateFromTableName($table);
  
                  if (!empty($this->segmentArchiveIds[$dateFromTable])) {
                      $archiveIds = $this->segmentArchiveIds[$dateFromTable];
                      $where     .= " OR idarchive IN (" . implode(',', $archiveIds) . ")";
                  }
              }
  
              $where = "($where)";
          }
          return $where;
      }
code_tokens: private function getBlobTableWhereExpr ( $ oldNumericTables , $ table ) { $ where = "" ; if ( ! empty ( $ this -> reportPeriodsToKeep ) ) // if keeping reports { $ where = "period NOT IN (" . implode ( ',' , $ this -> reportPeriodsToKeep ) . ")" ; // if not keeping segments make sure segments w/ kept periods are also deleted if ( ! $ this -> keepSegmentReports ) { $ this -> findSegmentArchives ( $ oldNumericTables ) ; $ dateFromTable = ArchiveTableCreator :: getDateFromTableName ( $ table ) ; if ( ! empty ( $ this -> segmentArchiveIds [ $ dateFromTable ] ) ) { $ archiveIds = $ this -> segmentArchiveIds [ $ dateFromTable ] ; $ where .= " OR idarchive IN (" . implode ( ',' , $ archiveIds ) . ")" ; } } $ where = "($where)" ; } return $ where ; }
docstring: Returns SQL WHERE expression used to find reports that should be purged.
docstring_tokens: Returns SQL WHERE expression used to find reports that should be purged .