From: pop Date: Fri, 28 Feb 2003 20:11:20 +0000 (+0000) Subject: That's it for today X-Git-Tag: ZEBRA.1.3.8~57 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=924ac21637671fe586641fc29952ef5a78c7b7c5;p=idzebra-moved-to-github.git That's it for today --- diff --git a/perl/lib/IDZebra/Resultset.pm b/perl/lib/IDZebra/Resultset.pm index 0831d9d..bf90d4b 100644 --- a/perl/lib/IDZebra/Resultset.pm +++ b/perl/lib/IDZebra/Resultset.pm @@ -34,6 +34,10 @@ sub new { $self->{errString} = $args{errString}; bless ($self, $class); + +# $self->{session}{resultsets}{$args{name}} = $self; +# weaken ($self->{session}{resultsets}{$args{name}}; + return ($self); } @@ -52,11 +56,10 @@ sub errString { return ($self->{errCode}); } +# ============================================================================= sub DESTROY { my ($self) = @_; -# print STDERR "Destroy RS\n"; - # Deleteresultset? if ($self->{odr_stream}) { @@ -66,6 +69,7 @@ sub DESTROY { } delete($self->{ro}); +# delete($self->{session}{resultsets}{$self->{name}}); delete($self->{session}); } # ----------------------------------------------------------------------------- @@ -79,6 +83,8 @@ sub records { my $schema = $args{schema} ? $args{schema} : ''; my $recordSyntax = $args{recordSyntax} ? $args{recordSyntax} : ''; + my $class = $args{class} ? $args{class} : ''; + my $ro = IDZebra::RetrievalObj->new(); IDZebra::records_retrieve($self->{session}{zh}, @@ -97,7 +103,11 @@ sub records { for (my $i=$from; $i<=$to; $i++) { my $rec = IDZebra::RetrievalRecord->new(); IDZebra::record_retrieve($ro, $self->{odr_stream}, $rec, $i-$from+1); - push (@res, $rec); + if ($class) { + + } else { + push (@res, $rec); + } } IDZebra::odr_reset($self->{odr_stream}); @@ -105,6 +115,7 @@ sub records { return (@res); } +# ============================================================================ sub sort { my ($self, $sortspec, $setname) = @_; unless ($setname) { diff --git a/perl/lib/IDZebra/Session.pm b/perl/lib/IDZebra/Session.pm index 338adb6..98e0bc5 100644 --- a/perl/lib/IDZebra/Session.pm +++ b/perl/lib/IDZebra/Session.pm @@ -1,4 +1,4 @@ -# $Id: Session.pm,v 1.6 2003-02-28 18:45:50 pop Exp $ +# $Id: Session.pm,v 1.7 2003-02-28 20:11:20 pop Exp $ # # Zebra perl API header # ============================================================================= @@ -13,7 +13,7 @@ BEGIN { use IDZebra::Resultset; use Scalar::Util; use Carp; - our $VERSION = do { my @r = (q$Revision: 1.6 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; + our $VERSION = do { my @r = (q$Revision: 1.7 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; our @ISA = qw(IDZebra::Logger); } @@ -29,6 +29,7 @@ sub new { bless ($self, $class); $self->{cql_ct} = undef; + $self->{cql_mapfile} = ""; return ($self); $self->{databases} = {}; @@ -193,7 +194,7 @@ sub _getRecordGroup { my $r = IDZebra::init_recordGroup($rg); $rg->{groupName} = $groupName if ($groupName ne ""); $ext = "" unless ($ext); - my $r = IDZebra::res_get_recordGroup($self->{zh}, $rg, $ext); + $r = IDZebra::res_get_recordGroup($self->{zh}, $rg, $ext); return ($rg); } @@ -436,9 +437,9 @@ sub _record_update_args { $buff = $args{data}; } elsif ($args{file}) { - open (F, $args{file}) || warn ("Cannot open $args{file}"); + CORE::open (F, $args{file}) || warn ("Cannot open $args{file}"); $buff = join('',()); - close (F); + CORE::close (F); } my $len = length($buff);