I've run into this problem, and resorted to using the Gremlin/Groovy over
REST (via the server-included plugin).

There really isn't a way to transactionally express a conditional (or
get-or-create) like that over the vanilla REST API, though I'm sure it's in
the works.

--
Matt Luongo
Co-Founder, Scholr.ly



On Thu, Dec 1, 2011 at 5:45 PM, dnagir <dna...@gmail.com> wrote:

> Hi,
>
> I wonder what's the best way to do something similar to unique constraints
> in RDBMS.
>
> For example, user registration requires that the user's email to be unique.
>
> Working over in Ruby over REST API, how do you achieve this?
>
> I assume I need an auto-index on email property of User nodes. Then query
> it
> to check the property.
>
> But how can I make it transactional? So that I am sure that between
> querying
> and inserting the node, no similar has been inserted.
>
> The transactional part better applies to reservation instead of user
> creation. But you get the point.
>
> Cheers.
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Unique-constraint-and-transaction-over-REST-tp3553148p3553148.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to