This is more for my own understanding than anything else, but I'm noticing that in https://github.com/jacobobryant/biff/blob/86cff26be20af430c3b0eb549607112458e44898/src/com/biffweb/impl/auth.clj#L240-L243, the db op is upsert; but all calls to new-user-tx (and the name itself, as well) seem to indicate that using "create" as the db op would work as well (`new-user-tx` is only ever called if we're looking to create a new user, as opposed to an already-existing user). Is my understanding correct?
The difference is what happens if somehow two signup requests occur at the same time. create will throw an exception while upsert will treat one of the requests as a signin basically.
thanks. This also brings up another question: I assume :db.op/upsert {:user/email email} basically means to treat :user/email email as the "id" for upsert, correct? and this is what leads to the create vs update situation as mentioned?
yep 👍