original_string: public function delete(IRow &$row)
      {
          $res = $this->getTable()->wherePrimary($row->getPrimary())->delete();
          $oldValues = [];
          if ($row instanceof ActiveRow) {
              $oldValues = $row->toArray();
          }
  
          if (!$res) {
              return false;
          }
  
          if ($this->auditLogRepository) {
              $from = $this->filterValues($this->excludeColumns($oldValues));
  
              $data = [
                  'version' => '1',
                  'from' => $from,
                  'to' => [],
              ];
              $this->pushAuditLog(AuditLogRepository::OPERATION_DELETE, $row->getSignature(), $data);
          }
  
          return true;
      }
code: public function delete(IRow &$row)
      {
          $res = $this->getTable()->wherePrimary($row->getPrimary())->delete();
          $oldValues = [];
          if ($row instanceof ActiveRow) {
              $oldValues = $row->toArray();
          }
  
          if (!$res) {
              return false;
          }
  
          if ($this->auditLogRepository) {
              $from = $this->filterValues($this->excludeColumns($oldValues));
  
              $data = [
                  'version' => '1',
                  'from' => $from,
                  'to' => [],
              ];
              $this->pushAuditLog(AuditLogRepository::OPERATION_DELETE, $row->getSignature(), $data);
          }
  
          return true;
      }
code_tokens: public function delete ( IRow & $ row ) { $ res = $ this -> getTable ( ) -> wherePrimary ( $ row -> getPrimary ( ) ) -> delete ( ) ; $ oldValues = [ ] ; if ( $ row instanceof ActiveRow ) { $ oldValues = $ row -> toArray ( ) ; } if ( ! $ res ) { return false ; } if ( $ this -> auditLogRepository ) { $ from = $ this -> filterValues ( $ this -> excludeColumns ( $ oldValues ) ) ; $ data = [ 'version' => '1' , 'from' => $ from , 'to' => [ ] , ] ; $ this -> pushAuditLog ( AuditLogRepository :: OPERATION_DELETE , $ row -> getSignature ( ) , $ data ) ; } return true ; }
docstring: Delete deletes provided record from repository and mutates the provided instance. Operation is logged to audit log.
  
  @param IRow $row
  @return bool
docstring_tokens: Delete deletes provided record from repository and mutates the provided instance . Operation is logged to audit log .