MutateInSpec.arrayPrepend constructor
MutateInSpec.arrayPrepend(})
Creates a MutateInSpec for adding values to the beginning of an array in a document.
When createPath
is true
, the path to the field will be created if it
does not already exist. Defaults to false
.
When xattr
is true
, this operation references the extended attribute
data of the document. Otherwise, it references the document body.
Defaults to false
.
Implementation
factory MutateInSpec.arrayPrepend(
String path,
Iterable<Object?> values, {
bool? createPath,
bool? xattr,
}) {
return MutateInSpec._create(
Opcode.arrayPushFirst,
path,
values,
createPath: createPath,
xattr: xattr,
multipleValues: true,
);
}