Thanks to visit codestin.com
Credit goes to github.com

Skip to content

IN statement doesn't produce correct output when combined with partial statement returning a list #55

@BenedictBoyle

Description

@BenedictBoyle

I want to write something like:

p1 = Pypher()
p2 = Pypher()
p2.split(<some input>, ",")
p1.IN(p2)

But the way the class IN(Statement) is defined means that this will come out unnecessarily wrapped in square braces and the cypher engine will fall over when it gets a list of lists.

I think this could be fixed by adding some logic to the class definition of IN and am happy to do the work over the weekend to raise a PR but wondered if you had a preference for how to fix given you know + understand the codebase far better than me? I would do something like checking if the partial statement contains a split() or collect() but I feel like there's a lot of scope for missing cases there and seems not very elegant.

Also possible I've misunderstood how to make a partial properly and there's a way to do what I want without changing the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions