QueryBuilder.clearAdd constructor
QueryBuilder.clearAdd({})
(en) Clears the specified collection and then add data.
(ja) 指定されたコレクションをclearした後、dataをAddします。
target: The collection name in DB.addData: Data specified when performing an add operation. Typically, this is assigned the list that results from calling toDict on a subclass of ClonableFile.returnData: If true, return the changed objs. If serialKey is set, the object will be returned with the serial number added.mustAffectAtLeastOne: If true, the operation will be marked as failed if it affects 0 objects. If the operation is treated as a failure, the isSuccess flag of the returned QueryResult will be set to false.serialKey: If not null, the add query will assign a unique serial number (integer value) to the specified key. This value is unique per collection. Note that only variables directly under the class can be specified as keys, not nested fields.resetSerial: If true, resets the managed serial number to 0 on a clear or clearAdd query.cause: Optional metadata for auditing or logging. Useful in high-security environments or for autonomous AI programs to record the reason or initiator of a query.
Implementation
QueryBuilder.clearAdd({
required this.target,
required List<CloneableFile> this.addData,
this.returnData = false,
this.mustAffectAtLeastOne = true,
this.serialKey,
this.resetSerial = false,
this.cause,
}) : type = EnumQueryType.clearAdd;