Thanks Dragos, I had looked at that one earlier but I was hoping for
something that was more implicit to a struct definition.
Something like:
type StructIndex struct{}
func NewStructIndex([]Interface{}) *StructIndex{}
func (si *StructIndex) Get(k string, v interface{}) []interface{}
Implementation would probably include an Index(fieldName) call as well or
it could create one based on heuristics.
I could put that together using maps or an radix-tree library, but I know I
would not take advantage of everything I library on the matter would.
In the mean time I'm trying widely different approach that may fit in my
scenario with cayley.
On Monday, June 5, 2017 at 4:37:59 PM UTC-7, Dragos Harabor wrote:
>
> Something like this?
> https://github.com/hashicorp/go-memdb
>
> Though it may have more features than you need. Or features that you don't
> yet know you want :-)
>
> On Monday, June 5, 2017 at 3:28:33 AM UTC-7, James Pettyjohn wrote:
>>
>> I'm loading a set of structs in memory and will be frequently using them
>> throughout the lifetime of the application and doing frequent 'queries'
>> against the set to get those where certain fields have certain values.
>>
>> Are there are any native go libraries which do this kind of sort of
>> "secondary index" on in memory data structures?
>>
>>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.