]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/OverIdx.pm
Merge remote-tracking branch 'origin/master' into lorelei
[public-inbox.git] / lib / PublicInbox / OverIdx.pm
index dcc2cff34a42128116374669d037384a96f407aa..bc2e3ef40b0b3980fe8b7de4d8bdd572f276232c 100644 (file)
@@ -688,4 +688,14 @@ DELETE FROM eidxq WHERE docid = ?
 
 }
 
+sub blob_exists {
+       my ($self, $oidhex) = @_;
+       my $sth = $self->dbh->prepare_cached(<<'', undef, 1);
+SELECT COUNT(*) FROM xref3 WHERE oidbin = ?
+
+       $sth->bind_param(1, pack('H*', $oidhex), SQL_BLOB);
+       $sth->execute;
+       $sth->fetchrow_array;
+}
+
 1;