| 17 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 18 | 
   | 
     procedure UpdateListCache; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 19 | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 20 | 
 + | 
     function GetLinksToFile(FileID: Integer): TLinks; | 
 
 
 
 
 
 
 
 
 | 21 | 
 + | 
     function GetLinksFromFile(FileID: Integer): TLinks; | 
 
 
 
 
 
 
 
 
 | 22 | 
 + | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 23 | 
   | 
     function GetFileInfo(FileID: Integer): TFileInfo; override; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 24 | 
   | 
     function GetFilesList(Ext: String; Pattern: String; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 25 | 
   | 
       NoEmptyFiles: Boolean; SortType: TSortType): TStrings; override; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 171 | 
   | 
 end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 172 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 173 | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 174 | 
 + | 
  | 
 
 
 
 
 
 
 
 
 | 175 | 
 + | 
 function TAccess_OUP_ADB.GetLinksToFile(FileID: Integer): TLinks; | 
 
 
 
 
 
 
 
 
 | 176 | 
 + | 
 var | 
 
 
 
 
 
 
 
 
 | 177 | 
 + | 
   i: Integer; | 
 
 
 
 
 
 
 
 
 | 178 | 
 + | 
 begin | 
 
 
 
 
 
 
 
 
 | 179 | 
 + | 
   SetLength(Result.ByName, 0); | 
 
 
 
 
 
 
 
 
 | 180 | 
 + | 
   FQuery.SQL.Text := 'SELECT src_link_offset, src_id FROM linkmap WHERE target_id = ' + IntToStr(FileID) + ' ORDER BY src_id ASC;'; | 
 
 
 
 
 
 
 
 
 | 181 | 
 + | 
   FQuery.Open; | 
 
 
 
 
 
 
 
 
 | 182 | 
 + | 
   SetLength(Result.ByID, FQuery.RecordCount); | 
 
 
 
 
 
 
 
 
 | 183 | 
 + | 
   if FQuery.RecordCount > 0 then | 
 
 
 
 
 
 
 
 
 | 184 | 
 + | 
   begin | 
 
 
 
 
 
 
 
 
 | 185 | 
 + | 
     i := 0; | 
 
 
 
 
 
 
 
 
 | 186 | 
 + | 
     repeat | 
 
 
 
 
 
 
 
 
 | 187 | 
 + | 
       Result.ByID[i].SrcOffset := FQuery.FieldByName('src_link_offset').AsInteger; | 
 
 
 
 
 
 
 
 
 | 188 | 
 + | 
       Result.ByID[i].Destination := FQuery.FieldByName('src_id').AsInteger; | 
 
 
 
 
 
 
 
 
 | 189 | 
 + | 
       Inc(i); | 
 
 
 
 
 
 
 
 
 | 190 | 
 + | 
       FQuery.Next; | 
 
 
 
 
 
 
 
 
 | 191 | 
 + | 
     until FQuery.EOF; | 
 
 
 
 
 
 
 
 
 | 192 | 
 + | 
   end; | 
 
 
 
 
 
 
 
 
 | 193 | 
 + | 
   FQuery.Close; | 
 
 
 
 
 
 
 
 
 | 194 | 
 + | 
 end; | 
 
 
 
 
 
 
 
 
 | 195 | 
 + | 
  | 
 
 
 
 
 
 
 
 
 | 196 | 
 + | 
 function TAccess_OUP_ADB.GetLinksFromFile(FileID: Integer): TLinks; | 
 
 
 
 
 
 
 
 
 | 197 | 
 + | 
 var | 
 
 
 
 
 
 
 
 
 | 198 | 
 + | 
   i: Integer; | 
 
 
 
 
 
 
 
 
 | 199 | 
 + | 
 begin | 
 
 
 
 
 
 
 
 
 | 200 | 
 + | 
   SetLength(Result.ByName, 0); | 
 
 
 
 
 
 
 
 
 | 201 | 
 + | 
   FQuery.SQL.Text := 'SELECT src_link_offset, target_id FROM linkmap WHERE src_id = ' + IntToStr(FileID) + ' ORDER BY target_id ASC;'; | 
 
 
 
 
 
 
 
 
 | 202 | 
 + | 
   FQuery.Open; | 
 
 
 
 
 
 
 
 
 | 203 | 
 + | 
   SetLength(Result.ByID, FQuery.RecordCount); | 
 
 
 
 
 
 
 
 
 | 204 | 
 + | 
   if FQuery.RecordCount > 0 then | 
 
 
 
 
 
 
 
 
 | 205 | 
 + | 
   begin | 
 
 
 
 
 
 
 
 
 | 206 | 
 + | 
     i := 0; | 
 
 
 
 
 
 
 
 
 | 207 | 
 + | 
     repeat | 
 
 
 
 
 
 
 
 
 | 208 | 
 + | 
       Result.ByID[i].SrcOffset := FQuery.FieldByName('src_link_offset').AsInteger; | 
 
 
 
 
 
 
 
 
 | 209 | 
 + | 
       Result.ByID[i].Destination := FQuery.FieldByName('target_id').AsInteger; | 
 
 
 
 
 
 
 
 
 | 210 | 
 + | 
       Inc(i); | 
 
 
 
 
 
 
 
 
 | 211 | 
 + | 
       FQuery.Next; | 
 
 
 
 
 
 
 
 
 | 212 | 
 + | 
     until FQuery.EOF; | 
 
 
 
 
 
 
 
 
 | 213 | 
 + | 
   end; | 
 
 
 
 
 
 
 
 
 | 214 | 
 + | 
   FQuery.Close; | 
 
 
 
 
 
 
 
 
 | 215 | 
 + | 
 end; | 
 
 
 
 
 
 
 
 
 | 216 | 
 + | 
  | 
 
 
 
 
 
 
 
 
 | 217 | 
 + | 
  | 
 
 
 
 
 
 
 
 
 | 218 | 
 + | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 219 | 
   | 
 function TAccess_OUP_ADB.GetFileInfo(fileid: Integer): TFileInfo; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 220 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 221 | 
   | 
   if fileid = -1 then |