mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Implement iter method on ExternalDocumentsIds
This commit is contained in:
parent
5b20e625f3
commit
bf0651f23c
2 changed files with 7 additions and 2 deletions
|
@ -18,7 +18,7 @@ pub struct DocumentOperation {
|
|||
pub kind: DocumentOperationKind,
|
||||
}
|
||||
|
||||
pub struct ExternalDocumentsIds(pub Database<Str, OwnedType<BEU32>>);
|
||||
pub struct ExternalDocumentsIds(Database<Str, OwnedType<BEU32>>);
|
||||
|
||||
impl ExternalDocumentsIds {
|
||||
pub fn new(db: Database<Str, OwnedType<BEU32>>) -> ExternalDocumentsIds {
|
||||
|
@ -86,6 +86,11 @@ impl ExternalDocumentsIds {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Returns an iterator over all the external ids.
|
||||
pub fn iter<'t>(&self, rtxn: &'t RoTxn) -> heed::Result<RoIter<'t, Str, OwnedType<BEU32>>> {
|
||||
self.0.iter(rtxn)
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator over mappings between requested internal ids and external ids.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue