]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Over.pm
move ->ids_after from mm to over
[public-inbox.git] / lib / PublicInbox / Over.pm
index 58fdea0e197ce4c54364a0e45befc89560284f6a..19da056a10aff5de4455e80c1e30b03190352258 100644 (file)
@@ -371,4 +371,15 @@ SELECT COUNT(*) FROM xref3 WHERE oidbin = ?
 
 sub blob_exists { oidbin_exists($_[0], pack('H*', $_[1])) }
 
+# used by NNTP.pm
+sub ids_after {
+       my ($self, $num) = @_;
+       my $ids = dbh($self)->selectcol_arrayref(<<'', undef, $$num);
+SELECT num FROM over WHERE num > ?
+ORDER BY num ASC LIMIT 1000
+
+       $$num = $ids->[-1] if @$ids;
+       $ids;
+}
+
 1;