Figured it out: `neocons.rest.records/instantiate-record-from` does the 
trick.

On Sunday, May 17, 2015 at 7:09:35 PM UTC-4, Sam Raker wrote:
>
> I'm using neocons to put some data into a Neo4j database. I need to create 
> relationships between nodes I've just created and nodes in the DB. I can't 
> retrieve the nodes based on id without caching them locally, and they're 
> not unique enough to retrieve using e.g. rest.nodes/find, so I need to use 
> Cypher to get at them. I'm wondering if there's a better way to do this 
> than what I currently am working with, namely 
>
> (nn/get conn (->  (cy/tquery conn "START person=node({sid}) MATCH 
> person-[:foo]->o RETURN o" {:sid 1}) first (get-in ["o" :metadata :id]))))
>
> (this is just a toy example, so if the Cypher query is too simple, forgive 
> me).
>
> This seems...too complicated? Am I missing something? Is there a more 
> idiomatic way to convert cypher results into neocons records?
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to