neoxygen / neo4j-neoclient

Simple PHP HttpClient for the Neo4j ReST API with Multi DB Support
MIT License
121 stars 138 forks source link

Empty response when creating node #38

Closed JackieXu closed 9 years ago

JackieXu commented 9 years ago

I tried the following:

$result = $client->sendCypherQuery('
    CREATE (a:TEST {foo: {bar}})
    RETURN a.foo
', array(
    'bar' => array(1, 2, 3)
))->getResult();

This returns an object without errors, but the identifiers key is also empty. It should contain an identifer a.foo with value array(1, 2, 3), right? As that's what Neo4j returns when I try the same in the web client.

JackieXu commented 9 years ago

It does appear to return the entire node when leaving off the property: return a instead of return a.foo.

Is this the desired outcome for getResult, and should I be using getRows in these cases instead? I suppose it does make sense that getResult and getRows return the data like the web panel does in its two tabs..

Okay, I rambled a bit, and didn't check the documentation throughly enough, my bad! Issue closed.

ikwattro commented 9 years ago

Sorry for delay I just moved. I will look at this this evening

ikwattro commented 9 years ago

Hey @JackieXu ,

So there was an issue, rows results were not added to identifiers. This has been fixed in 2.1.7, thanks for the report.