Using upsert I can verify that the uuid does not exist and than insert a new node.
But how do I verify that the account predicate does not exist in other nodes (not necessarily with the same uuid)?
Sorry for pinging, but uniqueness is quite important.
After 3 days of browsing around I realized that transaction will not help to maintain uniqueness.
So I am left with upsert. But how can I verify that two predicates are unique?
Hi @mbn18,
Can you answer couple of my questions regarding your query:
Do you want to update an account number to a given uuid (say uuid1) if that account number is already present for some otheruuid (say uuid2)?
Would your mutation always add a uuid and account or would you be possibly only updating account for a given uuid if that is already present?
Which index will you use for account and uuid predicates? It is suggested to use hash index as discussed here. Also both the predicates would require indexing since you will run eq operator on both of them.
I don’t foresee any issue because of the combination of two different predicates. Feel free to reach out if you get stuck somewhere.
No, account must be unique across all nodes (its like username. An easy abbreviation of customer name).
Current planing is that uuid will be immutable while account can be updated. We would however seperate Add from Update. So this upsert/mutate will take care of the Add procedure.
Cool, I don’t foresee any problem with the proposed query. Like I said you’d need two indexes to make two sub-queries. Indexing can take place in background while you serve queries.