function prepareOneQuery(DataMatcherLinkOnePart $source)
 {
     //var_dump('in prepareOneQuery');
     $columns = $this->GetColumnsFromSource($source);
     if (DALUtils::GetSourceType($source->sid) == "data file") {
         $fromLinkedServerQueryMaker = new FromLinkedServerQueryMaker($source, $columns);
         return $fromLinkedServerQueryMaker->MakeQueryOneTable();
     } else {
         return FromFileQueryMaker::MakeQueryToRotateTable($columns);
     }
 }
 public function GetFromPartBySidAndTableArray($sidsAndTables)
 {
     $result = array();
     foreach ($sidsAndTables as $key => $sidAndTable) {
         if (DALUtils::GetSourceType($sidAndTable->sid) == "data file") {
             $result[] = $this->getFromPartAsFromDatabase($sidAndTable);
         } else {
             $result[] = $this->getFromPartAsFromFile($sidAndTable);
         }
     }
     return implode(",", $result);
 }
 function GetFileNameBySid($sid)
 {
     return DALUtils::GetFileNameBySid($sid);
 }