- $this->log("irspy_debug", "query '", $this->{query}, "'");
- my $rs = $this->{conn}->search(new ZOOM::Query::CQL($this->{query}));
- delete $this->{query}; # No longer needed at all
- $this->log("irspy_debug", "found ", $rs->size(), " target records");
- foreach my $i (1 .. $rs->size()) {
- my $target = _render_record($rs, $i-1, "id");
- my $zeerex = _render_record($rs, $i-1, "zeerex");
- #print STDERR "making '$target' record with '$zeerex'\n";
- $target2record{lc($target)} =
- new ZOOM::IRSpy::Record($this, $target, $zeerex);
- push @{ $this->{targets} }, $target
- if $this->{allrecords};
- }
-
- # Make records for targets not previously in the database
- foreach my $target (keys %target2record) {
- my $record = $target2record{$target};
- if (!defined $record) {
- $this->log("irspy_debug", "made new record for '$target'");
- $target2record{$target} = new ZOOM::IRSpy::Record($this, $target);
- } else {
- $this->log("irspy_debug", "using existing record for '$target'");