Skip to content

Implement r.pathspec(...) #16

@NotJustAnna

Description

@NotJustAnna

This issue is a continuation of rethinkdb/rethinkdb#5007

Implement the discussed at the issue.

From the original issue:

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

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions