Skip to content
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

Support for REST format #13

Closed
aseemk opened this issue Nov 7, 2014 · 4 comments · Fixed by #16
Closed

Support for REST format #13

aseemk opened this issue Nov 7, 2014 · 4 comments · Fixed by #16

Comments

@aseemk
Copy link
Collaborator

aseemk commented Nov 7, 2014

Quick bug first: extractData recursively calls itself if an object has a data property, so this means it'll incorrectly drop legitimate property data if there happens to be a property named data. =)

But wait! That bug's not worth fixing, because (I think) you don't even need that function anymore, since the transactional endpoint returns just property data by default now. So you should just remove it.

But on that note, I'd like to request an option to return the REST format instead of the lean property-only format. Having node and relationship metadata is needed for ORM/OGM-type libraries.

Easy enough to request it:

http://neo4j.com/docs/stable/rest-api-transactional.html#rest-api-execute-statements-in-an-open-transaction-in-rest-format-for-the-return

This could potentially be just another option to add to #10's options-based API, e.g. format.

WDYT? SGTY? ORLY?

@brian-gates
Copy link
Contributor

Sorry I missed this issue!

I think your'e totally right! Which is awesome since it'll save some processing :) I'll take a look when I can.

If the REST format were requested, would we just emit the responses verbatim?

@aseemk
Copy link
Collaborator Author

aseemk commented Nov 9, 2014

Suh-weet, thanks!

You'd still do the dictionary-ifying thing (result[columns[i]] = row[i]), but within that, yep, you'd return the raw JSON verbatim.

@brian-gates
Copy link
Contributor

Removed the extractData method: brian-gates@1c00cf3

@aseemk
Copy link
Collaborator Author

aseemk commented Jan 29, 2015

In pull #16, I didn't generalize this to format, because I realized that adding graph support would mean entirely different parsing. (The results are no longer simple arrays of column values.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants