khonsulabs / bonsaidb

A developer-friendly document database that grows with you, written in Rust
https://bonsaidb.io/
Apache License 2.0
1.01k stars 37 forks source link

Add ability to list a collection's `Header`s without the document contents. #193

Closed ecton closed 2 years ago

ecton commented 2 years ago

It's sometimes helpful to be able to do operations using sets of Headers, where the contents are irrelevant. It seems natural to extend the Collection::list() builder with another method that returns a Vec<Header> instead of Vec<OwnedDocument>.

Edit 2022-03-02: This can be added in a similar fashion as connection::List::count() and schema::List::count() (which may get renamed and moved into the connection module by the time this issue is handled, so make sure to find the type that is returned from SerializedCollection::list.)