khonsulabs / bonsaidb

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

Entry API shouldn't require NamedCollection #313

Open ecton opened 11 months ago

ecton commented 11 months ago

Currently the only way to utilize the entry API is if you implement NamedCollection. This was done to make it so that the entry API can take an ID or the "name" key. We should offer a way to use an entry API via SerializedCollection that only allows the primary key.

This will cause conflicts with the NamedCollection API. I'm not sure if there's any way to unify the API without specialization, so most likely we should rename NamedCollection's entry API.