projects
/
ZOOM-Perl-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc2316f
)
Added support for the sortby2 function to allow sorting of SOLR databases.
author
Simon Jacob
<sjacob@nla.gov.au>
Mon, 11 Feb 2013 01:00:00 +0000
(12:00 +1100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 11 Feb 2013 12:28:53 +0000
(13:28 +0100)
ZOOM.xs
patch
|
blob
|
history
lib/ZOOM.pm
patch
|
blob
|
history
diff --git
a/ZOOM.xs
b/ZOOM.xs
index
4e5de76
..
b10513e
100644
(file)
--- a/
ZOOM.xs
+++ b/
ZOOM.xs
@@
-388,6
+388,12
@@
int
ZOOM_query_sortby(s, criteria)
ZOOM_query s
const char * criteria
ZOOM_query_sortby(s, criteria)
ZOOM_query s
const char * criteria
+
+int
+ZOOM_query_sortby2(s, strategy, criteria)
+ ZOOM_query s
+ const char * strategy
+ const char * criteria
ZOOM_scanset
ZOOM_connection_scan(c, startterm)
ZOOM_scanset
ZOOM_connection_scan(c, startterm)
diff --git
a/lib/ZOOM.pm
b/lib/ZOOM.pm
index
b85163f
..
6b2f8c9
100644
(file)
--- a/
lib/ZOOM.pm
+++ b/
lib/ZOOM.pm
@@
-578,6
+578,14
@@
sub sortby {
or ZOOM::_oops(ZOOM::Error::SORTBY, $sortby);
}
or ZOOM::_oops(ZOOM::Error::SORTBY, $sortby);
}
+sub sortby2 {
+ my $this = shift();
+ my($strategy, $sortby) = @_;
+
+ Net::Z3950::ZOOM::query_sortby2($this->_query(), $strategy, $sortby) == 0
+ or ZOOM::_oops(ZOOM::Error::SORTBY, $sortby);
+}
+
sub destroy {
my $this = shift();
sub destroy {
my $this = shift();