Giter Site home page Giter Site logo

Comments (8)

rdvdijk avatar rdvdijk commented on September 2, 2024

Can you provide an example set of Cypher-queries how to trigger the UniquePathNotUniqueException?

from neography.

rdvdijk avatar rdvdijk commented on September 2, 2024

Ah, I see what the problem is. The NeographyError contains the error code (400), the message (The pattern a-[r:FOO]->b produced multiple possible paths, and that is not allowed) and the stacktrace (very long) without the initial exception.

I will add a field to the NeographyError with the original Exception, in this case UniquePathNotUniqueException.

When I have finished you can do:

begin
  neo.execute_query("START a=node(1), b=node(2) CREATE UNIQUE a-[r:FOO]->b RETURN r")
rescue => e
  puts e.exception # => "UniquePathNotUniqueException"
end

I'll let you know when I'm done!

from neography.

rdvdijk avatar rdvdijk commented on September 2, 2024

I decided to just add this exception to Neography, makes more sense than my previous comment. So:

begin
  neo.execute_query("START a=node(1), b=node(2) CREATE UNIQUE a-[r:FOO]->b RETURN r")
rescue UniquePathNotUniqueException
  puts "that path is not unique!"
end

from neography.

rdvdijk avatar rdvdijk commented on September 2, 2024

@maxdemarzi, could you release a version with this change? (See commit 525ff47)

from neography.

7vingt avatar 7vingt commented on September 2, 2024

Thanks a lot rdvdijk, i will test the new behaviour as soon it will be released.

from neography.

maxdemarzi avatar maxdemarzi commented on September 2, 2024

Released 1.0.4

from neography.

rdvdijk avatar rdvdijk commented on September 2, 2024

👍

from neography.

7vingt avatar 7vingt commented on September 2, 2024

Nice, thanks guys

from neography.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.