-
Notifications
You must be signed in to change notification settings - Fork 135
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
resultDataContents #206
Comments
Hey @ekkis, CoffeeScript is definitely terse in cases like this, but it's correct. In JS, the order of operations is that And then Finally, To your question at the end, node-neo4j indeed provides no API today to return data in Hope that helps. Cheers. |
aseemk, thank you so much for the quick reply. yes, of course, it's embarrassing that I wouldn't have understood the = vs == from the start, and you're right, of course... "rest" is a valid value (I learned something new today - though the docs are not very good on what the valid list of values are). as for my use case, I'm porting an app from using the linkurious library (which uses the "graph" format returns) to using node-neo4j. I would prefer not to have to rewrite everything but just receive the data as it expects. I haven't yet taken the time to analyze the result structure of "rest" but it is different from that of "graph". I've forked and cloned your project (wasn't sure, branch v2 or thingdom/v2?) with the intention of patching it to allow returning this format but I'm unsure: do I patch the coffee source in |
No problem at all. Got it. Thanks for explaining. Here are the instructions for hacking on this library: https://github.com/thingdom/node-neo4j/blob/v2/CONTRIBUTING.md#development
Good luck, and let me know if I can help anymore! I'm going to go ahead close this issue, but feel free to keep posting any q's here. Cheers. |
Btw, the |
ok, I figured out how to get what I want: support for the 'graph' formatted results the API supports. it was a small patch and is lint clean, however, I've never written coffee and am not smart enough to implement the test. I added the test but cannot make it pass. help? here's the pull request: #207 |
I'm not sure that overloading the |
and yes, I know about time being short... but it would be great (for me) if you could do a release to npm with the patch soon. I'm reading about |
Awesome, @ekkis! Glad you figured this out for your needs, and thanks for opening the PR. Let's move the discussion on your approach to there. |
in looking at my distribution's
lib-new/GraphDatabase.js
, bottom of thecypher
method, I see:I tried looking at the sources here on github but I don't read coffee easily and couldn't even find the code, but in essence, line 236 seems to me wants to be
format ==
so it's a comparison, not an assignment. also line 240 should likely be:resultDataContents: formats
(or perhaps I'm wrong because I see formats is defined outside the function that generates the statements, so it seems to be a collector whose values are tossed...in any case "rest" is not a valid value for the endpoint, "graph" is and I don't see a way to pass that into the code. is this borked or how do I do this?
The text was updated successfully, but these errors were encountered: