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

Skip to content
This repository was archived by the owner on May 3, 2021. It is now read-only.
This repository was archived by the owner on May 3, 2021. It is now read-only.

Allow exists(Pattern). #185

@romain-rossi

Description

@romain-rossi

Thanks for the #182

Please, could you also allow exists(Pattern) function?

Here is a test with the expected assertion (not tested as it's not compiling):

    @Test
    void gh185() {
        final Node r = node("Resume").named("r");
        final Node u = node("UserSearchable").named("u");

        Statement s = match(r.relationshipFrom(u, "HAS"))
                .where(exists(r.relationshipTo(u, "EXCLUDES")).isFalse())
                .returningDistinct(r)
                .build();

        assertThat(cypherRenderer.render(s))
                .isEqualTo("MATCH (r:`Resume`)<-[:`HAS`]-(u:`UserSearchable`) WHERE (NOT EXISTS((r)-[:EXCLUDES]->(u))) RETURN DISTINCT r");
    }

Thanks

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions