Thanks Matt.

Yeah. I think the transaction API is in making. Would be great addition.

The server-side plugin will definitely work, but I personally prefer to use one 
way of doing things. At least until I will start speaking neo4j natively :)

Cheers,
Dmytrii
http://www.ApproachE.com


On 04/12/2011, at 6:35 PM, mhluongo [via Neo4j Community Discussions] wrote:

> 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 <[hidden email]> 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 
> > [hidden email] 
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> _______________________________________________ 
> Neo4j mailing list 
> [hidden email] 
> https://lists.neo4j.org/mailman/listinfo/user
> 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://neo4j-community-discussions.438527.n3.nabble.com/Unique-constraint-and-transaction-over-REST-tp3553148p3558628.html
> To unsubscribe from Unique constraint and transaction over REST, click here.
> NAML



--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Unique-constraint-and-transaction-over-REST-tp3553148p3558630.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

Reply via email to