Skip to content

Add a way to use multi-indexes in Horizon #632

Description

@mlucy

My proposal is that we add a new findContaining command, which behaves like findAll but on a multi-index.

So if you have a document {foo: 'a', bar: ['b', 'c']}, you could look it up with any of these commands

.findAll(foo: 'a')
.findAll(bar: ['b', 'c'])
.findContaining(bar: 'b')

I ran into the need for this while working on the web backend for Horizon cloud (@mglukhovsky is using Horizon to write the web interface), where every project has a set of users allowed to push to it, and we need to be able to look up all the projects a user is allowed to push to.

I'm not sure where this should go scheduling-wise, but I think it's pretty important. If we could get it in before we ship Horizon cloud that would save us some really ugly hacks, but I realize that's difficult.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions