Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where params don't allow to specify NOT clause or equals to undefined / null. #80

Open
1pxone opened this issue Oct 10, 2023 · 2 comments
Labels
feature New feature or request

Comments

@1pxone
Copy link

1pxone commented Oct 10, 2023

Tried to accomplish smth like this:

findRelationships({
    alias: 'Projects',
    where: {
        source: {
            id: id,
        },
        target: {
            deleted: null, // undefined or smth
        },
    },
    session: transaction,
}

Here I needed to fetch all Projects without deleted property. When Project is being deleted it gets ISO8601 string set into deleted property.

Are there any workarounds to solve this? (except raw cypher)
Thanks!

@1pxone 1pxone changed the title Where params doesn't allow to specify NOT clause or equals to undefined / null. Where params don't allow to specify NOT clause or equals to undefined / null. Oct 10, 2023
@1pxone
Copy link
Author

1pxone commented Oct 10, 2023

Equivalent cypher would be

MATCH (o:Organization { id: $id })-[:CONTAINS]->(p:Project)
WHERE p.deleted IS null
RETURN collect(DISTINCT p) as projects

@themetalfleece
Copy link
Owner

Hey, thanks for creating this issue!
Right now there is no support for null, but it should be, so it'll be one of the things I work on next. I'll keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants