Say, I want to create an account system. there is a user id, user name, user email and other fields.
I have the following "find_by" scenarios, so I will also have some "find_by" tables such as account_by_name, account_by_email.
When create an account, I need to check whether the name or email has already been used or not.
Considering the restrictions of batch and lwt, how to accomplish the logic above