maxdemarzi / neography Goto Github PK
View Code? Open in Web Editor NEWA thin Ruby wrapper to the Neo4j Rest API
License: MIT License
A thin Ruby wrapper to the Neo4j Rest API
License: MIT License
neography is a component that falls perfectly in the definition of what needs to be mocked when doing TDD.
Having an offline mode (think airplane-mode for iPads, or sqlite) that I could instantiate from a file and work only on memory could be a great help when testing and avoid setting multiple neo4j instances.
Reported in the wild
This gist https://gist.github.com/3395490 replaces HTTParty with curl/curb, which effectively should support pipelining and kept-alive connections. I use this code in a project of mine, which has close to 99% test coverage, and I haven't seen any problems so far with both authenticated and non-authenticated connections to 1.7.x servers, with batches and non-batched commands. Didn't try https though.
The speedup obviously depends on the connection: I found the curb version ~30% faster when crossing the atlantic, and not faster at all for localhost connections. No surprise here...
First off, I love this gem. I have been using Neography for the past two weeks now and it has been great. Can't wait for the streaming updates.
Now, I think I have found an issue, but if it's not please don't bite :)
I have been trying to use more batch requests, however I noted that it seems like the batch function does not escape the paths.
In my case I have key/value pairs on indicies with spaces, so the requests end up having spaces in the paths since they don't go through the get/post functions that would URI.encode the paths.
I hope I am not too wrong.
Neography 1.0.9 is not sending the authentication headers
The following code
require "neography"
neo = Neography::Rest.new("http://user:pw@host")
p neo.execute_query("start n = node(*) return count(n)")
Works with 1.0.8 (and older), but not with 1.0.9.
With ngrep, I see this request in 1.0.8
T 192.168.1.103:52100 -> 12.345.678.123:80 [AP]
POST /db/data/cypher HTTP/1.1.
Content-Type: application/json.
Accept: application/json;stream=true.
User-Agent: Neography/1.0.8.
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Connection: close.
Host: xxxxxxxxxxxxxxxxxxx.
Content-Length: 57.
.
##
T 192.168.1.103:52100 -> 12.345.678.123:80 [AP]
{"query":"start n = node(*) return count(n)","params":{}}
##
Version 1.0.9 sends this:
T 192.168.1.103:52152 -> 12.345.678.123:80 [AP]
POST /db/data/cypher HTTP/1.1.
Content-Type: application/json.
Accept: application/json;stream=true.
User-Agent: Neography/1.0.9.
Date: Fri, 22 Mar 2013 00:15:15 GMT.
Content-Length: 57.
Host: xxxxxxxxxxxxxxxxxxx.
.
{"query":"start n = node(*) return count(n)","params":{}}
##
The Authorization
header is missing
Since there is no authorization, the server responds with a 401
, and Neography throws the following error:
[...]/neography-1.0.9/lib/neography/connection.rb:146:in `handle_4xx_500_response': Neography::UnauthorizedError
from [...]/neography-1.0.9/lib/neography/connection.rb:112:in `evaluate_response'
from [...]/gems/neography-1.0.9/lib/neography/connection.rb:42:in `post'
...
Note: I am new to neo4j.
I am trying to run the example here: https://github.com/maxdemarzi/neography/blob/master/examples/facebook_v2.rb but get a different result than expected.
I get: "Johnathan should become friends with Mark"
I am running neo4j-community-1.4.M05 (running stock, with bin/neo4j start) - Is this a problem with the lib, or the wrong version of neo4j?
Thanks
ian
On the main page, you have this in the config:
config.parser = {:parser => MultiJsonParser}
But I think that it needs to be:
config.parser = MultiJsonParser
Sorry for being lazy and not doing a pull request :)
Something of a fringe case, but here goes:
When deleting a node from an index using "remove_node_from_index", if the value param is "" then the server returns a 404 message with an empty body. "handle_4xx_500_response" expects some JSON to return from the server, so you get a JSON error as opposed to some other kind of error from neography.
I've fixed it in my fork and can submit a pull request if that fits with how you want to handle it. Test spec is included.
I am using the batch feature to send batches of operations. When my batch is less than 1600 instructions, it works OK. When it has 2000, the request is failing with "HTTPClient::SendTimeoutError: execution expired"
Using 'batch_not_streaming' with the same batch works, and is faster.
After looking a little bit at the code I might have found the reason: when using "batch" method the http headers are set to "stream=true" (batch.rb), but the post via HttpClient is done using post method, and not 'post_async' as I imagine it should.
Once a relationship has been created, it's difficult to find and remove it. Let's say I have a relationship between a teacher and a student:
@neo.create_relationship(teacher, student)
There could potentially be a very large number of related nodes. In order to find the relationship and remove it, you have to grab all the related nodes, iterate over them, and fire off a request to Neo4j over rest for each one using the "self"
property to get the node's attributes:
rels = @neo.get_node_relationships(teacher, "out")
...
I can't help but think there's a more efficient method - does Neography already have this functionality?
I'm unable to create relationships in a batch. The moment I add a :create_relationship call to a batch, @neo.batch returns nil and nothing is created in my graph.
The following fails:
[:create_unique_node, "person", "ssn", "000-00-0001", {:first_name=>"Jane", :last_name=>"Doe", :ssn=>"000-00-0001", :_type=>"Person", :created_at=>1335269478}],
[:add_node_to_index, "person_ssn", "ssn", "000-00-0001", "{0}"],
[:create_node, {:street1=>"94437 Kemmer Crossing", :street2=>"Apt. 333", :city=>"Abshireton", :state=>"AA", :zip=>"65820", :_type=>"Address", :created_at=>1335269478}],
[:create_relationship, "has", "{0}", "{2}", {}]
However, the nodes get created (without the relationship) if I just run:
[:create_unique_node, "person", "ssn", "000-00-0001", {:first_name=>"Jane", :last_name=>"Doe", :ssn=>"000-00-0001", :_type=>"Person", :created_at=>1335269478}],
[:add_node_to_index, "person_ssn", "ssn", "000-00-0001", "{0}"],
[:create_node, {:street1=>"94437 Kemmer Crossing", :street2=>"Apt. 333", :city=>"Abshireton", :state=>"AA", :zip=>"65820", :_type=>"Address", :created_at=>1335269478}]
I've tried [:create_relationship, "has", "{0}", "{2}"]
instead with the same failing result. Since there is no error raised when my batch fails, I've been unable to track down exactly what is going wrong.
When using a set_property in a batch, if it uses a reference to a previous instruction by using the "{X}" syntax, both "{" and "}" will be escaped and the url sent to neo4j will look like "/node/%7BX%7D/properties/". This results in errors on the neo4j side, as it doesn't recognize the reference.
Wrong is perhaps a harsh word, but I don't think a library should be requiring user defined code at all, let alone automatically.
This caused a problem when I deployed something in production and monitored it with monit. Suddenly the lack of a HOME in the default monit environment prevents the application from running.
If one of my coworkers would start using this helpful method to load helper code he might start relying on it. Code would break on other people's machines (I know, unit tests, but still when that coworker would be running tests he wouldn't encounter the issue, muddling the source of the errors).
Worse, I have no way to prevent this loading of untested code from outside my application. The only way to avoid loading code is by specifying a foldername to ENV["neography_extensions"] that does not exist and then hope that no-one is ever going to create it (either on purpose or by accident).
The only useful role that I see for something like this is when working in an interactive environment, in that case it might be better to have either a separate require file that would do a normal require of neography.rb and then load the "extensions" separately.
Perhaps the worst part of this feature is that it's not documented at all (as far as I can see). So only people who read the code of all libraries they require will even know about it until they encounter an issue like I did with monit.
Using "execute_script" with a cypher query :
When i try to CREATE UNIQUE a relation which does already exists there is no way to know if neo4j has answered : UniquePathNotUniqueException
Is there a way to get errors from neo4j using @neo.execute_query("") ?
Thank you for the awesome neography gem!
I am having trouble using the current version (0.0.28) on jruby 1.6.7.2. It breaks because of oj's native c-extension. C-extensions are not supported in jruby.
The neography gem works fine at version 0.0.26 (when you still used crack instead of oj).
Do you have plans to make it compatible with jruby again?
Thanks and cheers
Jo
Is there any plan to add support for models such as Neo4j.rb has?
http://rdoc.info/github/andreasronge/neo4j/Neo4j/Rails/Model
I am aware of the Neology project, but it seems abandoned. Neoid seems to be mostly used for supplementing an RDBMS with neo4j relations.
Trying to use bundle exe rake neo4j:install
task gives me the error uninitialized constant OS
> bundle install
Fetching source index for http://rubygems.org/
sing rake (0.9.2.2)
Using crack (0.1.8)
Using httparty (0.7.8)
Using json (1.6.2)
Using os (0.9.4)
Using rubyzip (0.9.5)
Using neography (0.0.16)
Using bundler (1.0.21)
> bundle exec rake neo4j:install --trace
** Invoke neo4j:install (first_time)
** Execute neo4j:install
Installing Neo4j...
rake aborted!
uninitialized constant OS
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36:in `const_missing'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/neography-0.0.16/lib/neography/tasks.rb:8:in `block (2 levels) in <top (required)>'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/dnagir/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `load'
/Users/dnagir/.rvm/gems/ruby-1.9.3-p0/bin/rake:19:in `<main>'
Tasks: TOP => neo4j:install
# Rakefile
require 'neography/tasks'
# Gemfile
source 'http://rubygems.org'
gem 'rake'
gem 'neography'
I'm using neography to access Neo4j from rails and I have this test case that keep failing:
require 'spec_helper'
describe Graph do
before(:each) do
@neo = Neography::Rest.new
end
it "add node to index" do
test_index = @neo.create_node_index("test_index")
key = generate_text(6)
value = generate_text
response = @neo.create_node
new_index = @neo.add_node_to_index(test_index, key, value, response)
new_index.should_not be_nil
@neo.remove_node_from_index(test_index, key, value, response)
end
end
The index is created on the server, but no nodes are added, here is the rspec failure:
This may be another Neo4j bug, but I can't seem to remove a node from an index unless I remove the entire node. remove_node_from_index('my_index', my_node)
works and completely removes all references to the node from the index.
However, remove_node_from_index('my_index', 'my_key', my_node)
and the variant that supplies an explicit value both seem to silently fail. After calling either, I can do a find_node_index('my_index', 'my_key', 'removed_value')
and still find the index entry that should have been removed.
Hi
I installed neography. It works until I want load a page.
Neo4j it was installed without error and it start without error.
But when I load my index page I have an error who say:
ActiveRecord::ConnectionNotEstablished
I think it's because I try pass a project between the gem neo4j.rb to neography. But to avoid issues I created a new project and take the principal file. (controller, views but not config file.)
I use ruby 1.9.3
If you have an idea to help me to find why I have this issues, say it.
Best regard.
I had a case when the REST-interface returned a status-code 500.
response.code=>500
response.body=>"{ "message" : "Invalid UTF-8 start byte 0xa0\n at [Source: org.mortbay.jetty.HttpParser$Input@50cc63; line: 1, column: 1389]", "exception" : "org.codehaus.jackson.JsonParseException: Invalid UTF-8 start byte 0xa0\n at [Source: etc.........
I see that Connection#evaluate_response swallows that error. Since this is a serious error, I think neography should handle it the same way as 4xx-errors.
Could you please handle status-code 500 and raise an exception?
Thanks a lot
Jorg
This is running properly ---> nodes = @neo.get_node_index("Customer","id","4")
But this is creating error---->nodes = @neo.batch [:get_node_index, "Customer" ,"id" ,"4"]
Can anyone suggest me why this is creating problem ???
Please suggest me a more better way to find the existing node
Hi Maxdemarzi,
I just noticed that the download url of neo4j is changed now, so http://dist.neo4j.org won't work anymore in tasks. I'm not sure if you have planned to change it already. :-)
I love your work.
Thanks a lot.
NEO4J.batch [:create_unique_node, "properties_checksum", "properties_checksum", "076da301619e83cff84025301cf9b4adaa34a8251", {"measure_value"=>[50, 60], "properties_checksum"=>"076da301619e83cff84025301cf9b4adaa34a825"}]
return nil
if run NEO4J.batch [:create_unique_node, "properties_checksum", "properties_checksum", "076da301619e83cff84025301cf9b4adaa34a8251", {"measure_value"=>[50, 60].to_s, "properties_checksum"=>"076da301619e83cff84025301cf9b4adaa34a825"}]
will create a node
Hi there,
I am trying to do do
require 'rubygems'
require 'neography'
@neo = Neography::Rest.new # Inialize using all default parameters
root = @neo.get_root # Get the root node
puts root
max = @neo.create_node("age" => 31, "name" => "Max") # Create a node with some properties
puts max
@neo.create_relationship("friends", root, max)
/Users/peterneubauer/.rvm/gems/jruby-1.5.5/gems/neography-0.0.12/lib/neography/rest.rb:377:in get_id': private method
split' called for nil:NilClass (NoMethodError)
from /Users/peterneubauer/.rvm/gems/jruby-1.5.5/gems/neography-0.0.12/lib/neography/rest.rb:172:in `create_relationship'
from presentation.rb:10
I am using the latest neo4j 1.3.
Thanks for the awesome bindings!
Hi -- this may not be implemented yet, but I wanted to check. When using the "Phase 2" style that mimics neo4j.rb, is there a way to find/get using an index? Without that, I'm trying to determine how to do this:
someone = @neo.get_node_index("people", "name", "Bob")[0]
=> Hash containing the node info
someone_node = Neography::Node.load(id)
Obviously this isn't ideal since it's two calls, but also, the Hash returned from the get_node_index() call doesn't actually have the ID in an easy-to-get place -- it seems like I'd have to take "self" and parse out the ID from the end of the URL. Not great.
Is there something in the "Phase 2" functionality that I haven't stumbled on yet? Just curious where this stands. Thanks for the great work on neography!
is broken because
PUT http://localhost:7474/db/data/relationship/13/properties/cost
Accept: application/json
Content-Type: application/json
"deadly"
is not valid json. need to find workaround or get neo4j guys to fix content-type to 'text/plain'
To-Do:
Add cypher helper methods from:
https://github.com/jexp/app-net-graph/blob/master/lib/cypher.rb
So we can do:
https://github.com/jexp/app-net-graph/blob/master/lib/appnet.rb#L25
Reported:
if you try and use create unique relationship and your neo connection string is set to 127.0.0.1 it gives a no method error
Hi Max,
I get these two errors when I run your specs. Do you get these too?
FF....................................................................................................................................................................................
Failures:
1) Neography::Relationship find can index when Neography::Relationships are created
Failure/Error: Neography::Relationship.index(:strength)
undefined method `index' for Neography::Relationship:Class
# ./spec/integration/index_spec.rb:5:in `block (2 levels) in <top (required)>'
2) Neography::Relationship find can remove index when Neography::Relationship is deleted, just like nodes
Failure/Error: Neography::Relationship.index(:strength)
undefined method `index' for Neography::Relationship:Class
# ./spec/integration/index_spec.rb:5:in `block (2 levels) in <top (required)>'
Neography::Node.create(x: nil, y: 1).neo_id # => nil
Neography::Node.create(x: 0, y: 1).neo_id # => "1"
Should reject nils from the hash if that's a problem.
data.reject { |k, v| v.nil? }
Anyway if there's an error it should be raised.
I have neo4j -version 1.8.1- installed on Ubuntu 12.10 from official deb repository. I wanted to give a try neography, first I passed "rake neo4j:install" because it's already installed but next I couldn't run "rake neo4j:start" beacuse it couldn't find location of neo4j. I couldn't find the command that I could pass location of it like:
"rake neo4j:install --dir=/path/to/neo4j"
Following tests fails
describe Neography do
subject { Neography::Rest.new({:port => 7475, :log_enabled => false}) }
describe 'create_node' do
it 'should not convert strings to symbol' do
node = subject.create_node({:text => ':1456'})
node['data']['text'].class.should == String # fails! expected: String got: Symbol (using ==)
node['data']['text'].should == ':1456'
end
end
end
The string is correctly stored as ':1456' in the database, but I expect it to be returned as a string and not to be converted to a ruby-symbol. I analyzed it on get_node() and I saw that the Oj-library is doing the deserialization but I couldn't see how I could override that behaviour easily.
How could I change that behaviour? Shouldn't neography always return strings?
Cheers
Jorg
I don't understand this error. I am not even sure where the error is coming from in my code exactly because the backtrace is very skimpy:
/app/vendor/bundle/ruby/1.9.1/bundler/gems/neography-e0f56c3900f9/lib/neography/connection.rb:104:in `evaluate_response'
/app/vendor/bundle/ruby/1.9.1/bundler/gems/neography-e0f56c3900f9/lib/neography/connection.rb:37:in `get'
I am also using Neoid, but I am not sure if that is involved here.
Looks like rake neo4j:start
returns "Starting Neo4j..." no matter if it was able to be started or not.
[email protected] seems to be offline?
I used this to confirm: http://verify-email.org/
Your message cannot be delivered to the following recipients:
Recipient address: [email protected]
Reason: Remote SMTP server has rejected address
Diagnostic code: smtp;550-5.1.1 The email account that you tried to reach does not exist. Please try the recipient's email address for typos or spaces. Learn more at http://support.google.com/mail/bin/answer.py?answer=6596 s4si2643652
Remote system: dns;gmail-smtp-in.l.google.com (TCP|17.148.16.98|64210|74.125.127.26|25) (mx.google.com ESMTP s4si26436520pbc.345)
Original-envelope-id: [email protected]
Reporting-MTA: dns;nk11r10mm-asmtp023.mac.com (tcp-daemon)
Arrival-date: Tue, 21 Feb 2012 23:42:07 +0000 (GMT)
I've created a pull request with an example here: #90
Basically, the behavior I've experienced is that a batch will fail quietly without raising an error.
Best,
Dave
> $neo.execute_script "m=[:]; m['k']='v'; m"
=> {"k"=>"v"}
> $neo.execute_script "m=[:]; m['k']='v'; [m, m]"
=> ["{k=v}", "{k=v}"]
desired result is
[{"k"=>"v"}, {"k"=>"v"}]
I've only just started playing around with Neography (and Neo4J), so not sure if this expected behaviour, but if I do the following:
node = Neography::Node.create("age" => 31, "name" => "Max")
node.both.size #or any array-type functions
I get
NoMethodError: undefined method `collect' for nil:NilClass
This appears to be caused by this line:
return nil if node_relationships.empty?
which is expected to be something that responds to collect.
Happy to do a spec/patch/pull request if this is a bug rather than expected behaviour
Hi, I just stumbled upon a little problem when changing an attribute on a relationship. In property.rb we call neo_server.set_relationship_properties but neo_server is not available for Relationships. I will add a suggested fix, but I am not sure if this will be the way it should be ;)
Is it possible to create unique nodes using the Phase 2 interface?
As samples use symbol, and this is the best practice.
The "max depth" option name given in the traverse, get_path and get_paths methods should be "max_depth" (note underscore). Otherwise Neo4j 1.4 defaults to a depth of 1 and very uninteresting traversals :)
Batch operations are absolutely crucial with REST, where transactions are only available within a single request.
Would be great to have an API for that.
I can approximately see how to use it.
Instead of:
nodes = (1..1000).map { |n| Neography::Node.create("age" => n % 30 + 20, "name" => "Max #{n}") }
# all nodes are avilable, it executes 1000 requests
We would write something among:
nodes = Neography::Batch.start do
(1..1000).map { |n| Neography::Node.create("age" => n % 30 + 20, "name" => "Max #{n}") }
end
# all nodes are created and available here. Only 1 batch operation request is executed.
So when we are within a batch operation, all the requests would be accumulated instead of actually sent.
Then dispatch at the end.
I'm having an error when adding data via neography, any suggestions?
$ irb
require 'bundler/setup'
=> true
require 'neography'
=> true
@neo = Neography::Rest.new
=> #<Neography::Rest:0x007faaba97d170 @protocol="http://", @server="localhost", @PORT=7474, @Directory="", @cypher_path="/cypher", @gremlin_path="/ext/GremlinPlugin/graphdb/execute_script", @log_file="neography.log", @log_enabled=false, @max_threads=20, @authentication={}, @parser={:parser=>MultiJsonParser}, @user_agent={"User-Agent"=>"Neography/0.0.31"}>?> def create_person(name)
'
@neo.create_node("name" => name)
end
=> nil
johnathan = create_person('Johnathan')
NotImplementedError: MultiJsonParser has not implemented a parsing method for the :json format.
from /Users/drewgilliam/Documents/Labs/Labs7/EmergingTechRadar/vendor/ruby/1.9.1/gems/neography-0.0.31/lib/neography/multi_json_parser.rb:13:injson' ... from (irb):6:in
create_person'
from (irb):8
from /Users/drewgilliam/.rvm/rubies/ruby-1.9.3-head/bin/irb:16:in `
What i have to do is to get the parents => grand parents => like this kind of tree interrelated to each other.
I m doing something like this
@neo.traverse(self.node_id, "nodes", {"order" => "depth first",
"relationships" => [{"type"=> "father",
"direction" => "out"},
{"type"=> "mother",
"direction" => "out"}],
"depth" => 4})
It fetched accurately but don't have any relationships with the data returned means it only contains the stored value not the relationship id or related node there Can we get that ?
Here is the output
[{"paged_traverse"=>"http://localhost:7474/db/data/node/2/paged/traverse/{returnType}{?pageSize,leaseTime}", "outgoing_relationships"=>"http://localhost:7474/db/data/node/2/relationships/out", "data"=>{"id"=>101, "name"=>"Msee", "dob"=>"Oct 03, 1934"}, "all_typed_relationships"=>"http://localhost:7474/db/data/node/2/relationships/all/{-list|&|types}", "traverse"=>"http://localhost:7474/db/data/node/2/traverse/{returnType}", "self"=>"http://localhost:7474/db/data/node/2", "all_relationships"=>"http://localhost:7474/db/data/node/2/relationships/all", "property"=>"http://localhost:7474/db/data/node/2/properties/{key}", "outgoing_typed_relationships"=>"http://localhost:7474/db/data/node/2/relationships/out/{-list|&|types}", "properties"=>"http://localhost:7474/db/data/node/2/properties", "incoming_relationships"=>"http://localhost:7474/db/data/node/2/relationships/in", "incoming_typed_relationships"=>"http://localhost:7474/db/data/node/2/relationships/in/{-list|&|types}", "extensions"=>{}, "create_relationship"=>"http://localhost:7474/db/data/node/2/relationships"}]
CrackParser is breaking... moving back MultiJson except where we may get properties since that technically doesn't follow the JSON spec and all that mess.
Only on the second node.property = "value"
it write the value.
Doesn't work with node[:property]
at all. Running w/ latest git code.
> n = Node.create(name: "Test") # => #<Neography::Node name="Test">
> n.prop = 1 # => 1
> n.prop # => *** nil ***: First time, value still nil
> n.prop = 1 # => 1
> n.prop # => 1: Second time, value written
> n[:prop] # => 1
> n[:prop2] = 2 # => 2
> n[:prop2] # => *** nil ***
> n[:prop2] = 2 # => 2
> n[:prop2] # => *** nil ***
> n.name # => "Test"
> n.name = "New Name" # => "New Name"
> n.name # => "New Name" (That's an existing property, it works)
Currently, all responses are handled by the evaluate_response method which returns either a response or nil. This makes it difficult to tell whether a request was successful, but contained no body (204) or whether a request was unsuccessful (e.g. 40x). One could look in the log (if logging is enabled), but that's not really sufficient. Furthermore, This code doesn't appear to handle other error conditions (e.g. additional 40x or 50x status).
It would be great if the caller could get at the full HTTP response, especially the status code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.