Despite a ton of searching, I can't find any method equivalent in the Firebase Realtime Database to the increment method available in Firestore.
The problem I am trying to solve is that I have a ticketing app which increments a counter on Firebase for attendees at the event; however if a user went offline and was registering attendees with the persistent database, while another user who is online was also doing so, when the first user comes back online, they overwrite the value for the counter using their stored value plus any additional attendees they validated before coming back online. This does not take into account the fact that the value of the counter had changed before they came back online. There will be 6 people validating event tickets, so this value will always be wrong if someone reconnects and overwrites values registered by the other users. So if there is an increment method like this one:
increment = firebase.firestore.FieldValue.increment(1);
Can you please let me know what it is? If not, how would you approach my issue with data persistence on the device in Swift?
N.B. I am using the Realtime Database as opposed to Firestore because it was recommended for speed and data use when you are in a situation where you are doing a ton of small updates to the database -- which obviously will be the case when you are processing tickets for thousands of people.