I would like to create a unique user Node. The node would have at least two fields that should be unique, UID and Email. In order to create this node two calls would be required to the db, one to create the node using the unique index REST call passing a key/value pair and another to add the other key/value pair to the index with the unique option.
I mentioned this use case before and some suggestions were to use a compound key or use batch insert. The compound key will not work. The batch insert looks like it would solve this use case since all commands are preformed in a single transaction.
However, when you create a unique node or insert a key/value into a index using the unique option it will return a 200 if the key/value mapping already exists. This will allow all of the following commands in the batch to process since the batch transaction is only rolled back if a non-2xx is returned.
Is it correct to have the unique REST commands return a 200 if key/value mapping already exists? Usually in a RDBMS you would get a exception thrown because of a constraint violation. I am not suggesting that an exception be thrown but a non-2xx would be nice (302 - Found).
Am I thinking about this incorrectly?
I would like to create a unique user Node. The node would have at least two fields that should be unique, UID and Email. In order to create this node two calls would be required to the db, one to create the node using the unique index REST call passing a key/value pair and another to add the other key/value pair to the index with the unique option.
I mentioned this use case before and some suggestions were to use a compound key or use batch insert. The compound key will not work. The batch insert looks like it would solve this use case since all commands are preformed in a single transaction.
However, when you create a unique node or insert a key/value into a index using the unique option it will return a 200 if the key/value mapping already exists. This will allow all of the following commands in the batch to process since the batch transaction is only rolled back if a non-2xx is returned.
Is it correct to have the unique REST commands return a 200 if key/value mapping already exists? Usually in a RDBMS you would get a exception thrown because of a constraint violation. I am not suggesting that an exception be thrown but a non-2xx would be nice (302 - Found).
Am I thinking about this incorrectly?
Actually,
I just got my quicktime screencast working, so I could do one with eclipse :-)?
Send from mobile.