is there a way to perform an atomic delete in Firebase?
the docs say
You can also delete by specifying nil as the value for another write operation such as setValue or updateChildValues...Simultaneous updates made this way are atomic: either all updates succeed or all updates fail.
but I can't get it to work. My code below returns an error
Cannot store object of type _SwiftValue at . Can only store objects of type NSNumber, NSString, NSDictionary, and NSArray
Is there something I'm missing here or are the docs wrong?
var topNodeRef = FIRDatabase.database().reference()
var childUpdates: [String:Any?] = [:]
childUpdates.updateValue(nil, forKey: "/owner")
childUpdates.updateValue(nil, forKey: "/pet")
topNodeRef.updateChildValues(childUpdates)