Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class WriteBatch
- Object
- WriteBatch
A group of writes applied atomically by Firestore.commit(WriteBatch).
Paths are relative to the database root, such as cities/SF.
Constructors
public WriteBatch() |
Methods
Inherited methods
Constructor details
WriteBatch
public WriteBatch()Method details
set
public WriteBatch set(String path, Map<String, Object> data)Replaces or creates a document.
Parameters
pathString- the document path
dataMap<String, Object>- the full contents
Returns
this batch
update
public WriteBatch update(String path, Map<String, Object> data)Updates only the given fields of an existing document.
Parameters
pathString- the document path
dataMap<String, Object>- the fields to change
Returns
this batch
delete
public WriteBatch delete(String path)Deletes a document.
Parameters
pathString- the document path
Returns
this batch
size
public int size()Returns
the number of queued writes