]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/OverIdx.pm
lei_store: local storage for Local Email Interface
[public-inbox.git] / lib / PublicInbox / OverIdx.pm
index 4a39bf5346285fc9dd3c464545cd48e3b6db02c6..c8630ddb3da72a8cf490ee2b6be43c06512b6a05 100644 (file)
@@ -684,4 +684,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;