Skip to content

Intersect inside where clause #248

Open
@rrottier

Description

@rrottier

I am trying to run the following query:

(select sessions
    (join events (= :events.sessionid :sessionid))
    (fields :clinic :events.sessionid)
    (where {:sessions.istrainingmode false
            :sessions.sessionid [in 
                                 (intersect 
                                  (queries 
                                   (subselect events
                                              (fields :sessionid)
                                              (where {:name [like "%Write%"]}))
                                   (subselect events
                                              (fields :sessionid)
                                              (where {:name [like "%Impedance%"]})))
                                   (order :sessionid)))]}))

It fails because the inner query executes first and then the outer query fails on receiving the map. In these type of queries the entire query should be build first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions