Comments (8)
Can you provide an example set of Cypher-queries how to trigger the UniquePathNotUniqueException
?
from neography.
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.
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.
@maxdemarzi, could you release a version with this change? (See commit 525ff47)
from neography.
Thanks a lot rdvdijk, i will test the new behaviour as soon it will be released.
from neography.
Released 1.0.4
from neography.
👍
from neography.
Nice, thanks guys
from neography.
Related Issues (20)
- send authorization token
- Undefined method 'each' for nil:NilClass
- How to use the neo4j graph algorithms using neography?
- config protocol issue "://"
- Getting random SocketError: Connection refused when creating relationships on large import HOT 4
- Ruby gem contains erroneous references HOT 6
- how can I get expanded query results like in browser
- Rake task namespace
- create_spatial_index throws "No index provider 'spatial' found" for Neo4j 3.0 HOT 1
- what is the index name when I create a schema index? HOT 2
- maintaining compatability with Neo4j? HOT 1
- trying to get nodes based on relationship HOT 6
- how do I get the node or nodes related to a start node? HOT 1
- what is the format of the queries for .find?
- I am using Phase2 to get related nodes...where can I find docs on the methods? HOT 2
- how do I create a query of neo4j using the neography ruby gem? HOT 2
- what is the query format for the Phase 2 Nodes? HOT 1
- how do I pass a string for the relationship in a query? HOT 2
- can you clarify what it means Phase 2?
- getting error Neography::NeographyError: NeographyError: when i am using ActiveRecord with neo4j .
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neography.