Skip to content

Create a convenient way to do pathspecs in the java driver #5007

@deontologician

Description

@deontologician

Right now pathspecs are kind hairy due to Java's lack of nice hashmap and List literals:

in javascript:

r.table('foo').filter({x: {y: {z: "bar"}}})

turns into the java query:

r.table("foo").filter(r.hashMap("x", r.hashMap("y", r.hashMap("z", "bar"))))

Since depth-first is more common in path-specs than breadth first, it might make sense to have a special r.pathspec convenience that creates the appropriate hashmap structure. It might look something like:

r.table("foo").filter(r.pathspec("x", "y", "z", "bar"))

I haven't really thought about branching pathspecs too much, maybe there's no syntax that would work well. It's something to think about.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions