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

How i can disable \n on build query? #392

Open
bekkazy-k opened this issue Aug 23, 2024 · 1 comment
Open

How i can disable \n on build query? #392

bekkazy-k opened this issue Aug 23, 2024 · 1 comment

Comments

@bekkazy-k
Copy link

bekkazy-k commented Aug 23, 2024

  const movieNode = new Cypher.Node();
  const pattern = new Cypher.Pattern(movieNode, { labels: ["Movie"] });

  const matchQuery = new Cypher.Match(pattern)
      .where(movieNode, {
          title: new Cypher.Param("The Matrix"),
      })
      .return(movieNode.property("title"));

  const { cypher, params } = matchQuery.build();

My result:

MATCH (this0:Movie)
WHERE this0.title = $param0
RETURN this0.title

I need

MATCH (this0:Movie) WHERE this0.title = $param0 RETURN this0.title
@angrykoala
Copy link
Member

Hi @bekkazy-k

This is not supported at the moment. I'll discuss with the rest of the team if this is a feature we want to add to Cypher Builder

In the meantime, a workaround would be to replace \n with " " in the returned string. I'm unsure if this would break the generated Cypher in some cases

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

No branches or pull requests

2 participants