timshannon / badgerhold

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

SortBy ASC and DESC per Field #85

Open artvel opened 2 years ago

artvel commented 2 years ago

badgerhold is awesome!

What do you guys think?

timshannon commented 2 years ago

That's what the Reverse method does.

Where("field").Eq(value).SortBy("field").Reverse()

I'm glad you think badgerhold is awesome.

artvel commented 2 years ago

Yes, it does. But you can't combine it with multiple fields.

timshannon commented 2 years ago

Apologies, I didn't' read the issue close enough. You're correct. Having multiple independent sorting per field isn't really doable currently.

Thanks for reporting.