timshannon / badgerhold

BadgerHold is an embeddable NoSQL store for querying Go types built on Badger
MIT License
515 stars 52 forks source link

Add LoadBy method #32

Closed ivanjaros closed 3 years ago

ivanjaros commented 3 years ago

Since there is support for unique indices, I am missing a method to load record by this unique field. The find method uses slice which requires more lines of code to return single result.

timshannon commented 3 years ago

Yep, the sister project to this one BoltHold has a FindOne function, that sounds similar to what you are asking.

timshannon commented 3 years ago

FindOne has been added to master via #42