-# $Id: Resultset.pm,v 1.6 2003-03-03 12:14:27 pop Exp $
+# $Id: Resultset.pm,v 1.8 2003-03-05 13:55:22 pop Exp $
#
# Zebra perl API header
# =============================================================================
use IDZebra::Logger qw(:flags :calls);
use Scalar::Util qw(weaken);
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.8 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
our @ISA = qw(IDZebra::Logger);
}
sub DESTROY {
my $self = shift;
+# print STDERR "Destroy RS\n";
# Deleteresultset?
my $stats = 0;
}
unless ($setname) {
- $_[0] = $self->{session}->sortResultsets($sortspec,
- $self->{name}, ($self));
+ return ($_[0] = $self->{session}->sortResultsets($sortspec,
+ $self->{session}->_new_setname, ($self)));
return ($_[0]);
} else {
return ($self->{session}->sortResultsets($sortspec,
=head1 SORTING
+You can sort resultsets by calling:
+ $rs1->sort($sort_expr);
+
+or create a new sorted resultset:
+
+ $rs2 = $rs1->sort($sort_expr);
+
+The sort expression has the same format as described in the I<yaz_client> documentation. For example:
+
+ $rs1->sort('1=4 id');
+
+will sort thr results by title, in a case insensitive way, in descending order, while
+
+ $rs1->sort('1=4 a');
+
+will sort ascending by titles.
=head1 COPYRIGHT
=head1 SEE ALSO
-IDZebra, IDZebra::Data1, Zebra documentation
+Zebra documentation, IDZebra::ResultSet, IDZebra::RetrievalRecord manpages.
=cut