Skip to content

Tying "filters" and "order by" to proper shape object #41

Description

@Pentusha

Query that could not be expressed with current state of query builder:

select User {
    friends: {
        name
    } FILTER .name = User.name
}

That's how edgedb-js solves this issue:

e.select(e.User, (user) => ({
   friends: (friend) => ({
      name: true,
      filter: e.op(friend.name, "=", user.name)
   })
}))

It creates a new closure using anonymous functions. Not sure that it is the good solution for python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions