WriteBatch class
Represents a batch of write operations.
Use methods like set, update, delete, then commit to execute atomically.
Parameters:
name: A unique name for the batch.
Returns: An instance of WriteBatch.
Example:
var batch = oracledb.batch();
batch.set(docRef, {'name': 'New Doc'});
await batch.commit();
Constructors
- WriteBatch({required String name})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
commit(
) → Future< void> - Commits the batch of operations atomically.
-
delete(
DocumentReference< Object?> docRef) → void - Queues a delete operation for the given document.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set<
T> (DocumentReference< T> docRef, T data, [SetOptions? options]) → void - Queues a set operation for the given document.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
DocumentReference< Object?> docRef, Map<String, dynamic> data) → void - Queues an update operation for the given document.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited