trait Update extends AnyRef
- Alphabetic
- By Inheritance
- Update
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
addEachToSet[A](fieldName: String, values: Seq[A]): Update
Creates an update that adds each of the given values to the array value of the field with the given name, unless the value is already present, in which case it does nothing
Creates an update that adds each of the given values to the array value of the field with the given name, unless the value is already present, in which case it does nothing
- fieldName
the non-null field name
- values
the values
- returns
the update
-
abstract
def
addToSet[A](fieldName: String, value: A): Update
Creates an update that adds the given value to the array value of the field with the given name, unless the value is already present, in which case it does nothing
Creates an update that adds the given value to the array value of the field with the given name, unless the value is already present, in which case it does nothing
- fieldName
the non-null field name
- value
the value, which may be null
- returns
the update
- abstract def bitwiseAnd(fieldName: String, value: Long): Update
-
abstract
def
bitwiseAnd(fieldName: String, value: Int): Update
Creates an update that performs a bitwise and between the given integer value and the integral value of the field with the given name.
Creates an update that performs a bitwise and between the given integer value and the integral value of the field with the given name.
- fieldName
the field name
- value
the value
- returns
the update
- abstract def bitwiseOr(fieldName: String, value: Long): Update
-
abstract
def
bitwiseOr(fieldName: String, value: Int): Update
Creates an update that performs a bitwise or between the given integer value and the integral value of the field with the given name.
Creates an update that performs a bitwise or between the given integer value and the integral value of the field with the given name.
- fieldName
the field name
- value
the value
- returns
the update
- abstract def bitwiseXor(fieldName: String, value: Long): Update
-
abstract
def
bitwiseXor(fieldName: String, value: Int): Update
Creates an update that performs a bitwise xor between the given integer value and the integral value of the field with the given name.
Creates an update that performs a bitwise xor between the given integer value and the integral value of the field with the given name.
- fieldName
the field name
- value
the value
- returns
the update
-
abstract
def
combinedWith(anotherUpdate: Update): Update
Merges 2 sequences of update operations together.
Merges 2 sequences of update operations together.
- anotherUpdate
the update to be merged with
- returns
the update
-
abstract
def
currentDate(fieldName: String): Update
Creates an update that sets the value of the field to the current date as a BSON date.
Creates an update that sets the value of the field to the current date as a BSON date.
- fieldName
the non-null field name
- returns
the update
-
abstract
def
currentTimestamp(fieldName: String): Update
Creates an update that sets the value of the field to the current date as a BSON timestamp.
Creates an update that sets the value of the field to the current date as a BSON timestamp.
- fieldName
the non-null field name
- returns
the update
-
abstract
def
inc(fieldName: String, number: Number): Update
Creates an update that increments the value of the field with the given name by the given value.
Creates an update that increments the value of the field with the given name by the given value.
- fieldName
the non-null field name
- number
the value
- returns
the update
-
abstract
def
max[A](fieldName: String, value: A): Update
Creates an update that sets the value of the field to the given value if the given value is greater than the current value of the field.
Creates an update that sets the value of the field to the given value if the given value is greater than the current value of the field.
- fieldName
the non-null field name
- value
the value
- returns
the update
-
abstract
def
min[A](fieldName: String, value: A): Update
Creates an update that sets the value of the field to the given value if the given value is less than the current value of the field.
Creates an update that sets the value of the field to the given value if the given value is less than the current value of the field.
- fieldName
the non-null field name
- value
the value
- returns
the update
-
abstract
def
mul(fieldName: String, number: Number): Update
Creates an update that multiplies the value of the field with the given name by the given number.
Creates an update that multiplies the value of the field with the given name by the given number.
- fieldName
the non-null field name
- number
the non-null number
- returns
the update
-
abstract
def
popFirst(fieldName: String): Update
Creates an update that pops the first element of an array that is the value of the field with the given name.
Creates an update that pops the first element of an array that is the value of the field with the given name.
- fieldName
the non-null field name
- returns
the update
-
abstract
def
popLast(fieldName: String): Update
Creates an update that pops the last element of an array that is the value of the field with the given name.
Creates an update that pops the last element of an array that is the value of the field with the given name.
- fieldName
the non-null field name
- returns
the update
-
abstract
def
pull[A](fieldName: String, value: A): Update
Creates an update that removes all instances of the given value from the array value of the field with the given name.
Creates an update that removes all instances of the given value from the array value of the field with the given name.
- fieldName
the non-null field name
- value
the value, which may be null
- returns
the update
-
abstract
def
pullAll[A](fieldName: String, values: Seq[A]): Update
Creates an update that removes all instances of the given values from the array value of the field with the given name.
Creates an update that removes all instances of the given values from the array value of the field with the given name.
- fieldName
the non-null field name
- values
the values
- returns
the update
-
abstract
def
pullByFilter(filter: Filter): Update
Creates an update that removes from an array all elements that match the given filter.
Creates an update that removes from an array all elements that match the given filter.
- filter
the query filter
- returns
the update
-
abstract
def
push[A](fieldName: String, value: A): Update
Creates an update that adds the given value to the array value of the field with the given name.
Creates an update that adds the given value to the array value of the field with the given name.
- fieldName
the non-null field name
- value
the value, which may be null
- returns
the update
-
abstract
def
pushEach[A](fieldName: String, values: Seq[A], options: PushOptions): Update
Creates an update that adds each of the given values to the array value of the field with the given name, applying the given options for positioning the pushed values, and then slicing and/or sorting the array.
Creates an update that adds each of the given values to the array value of the field with the given name, applying the given options for positioning the pushed values, and then slicing and/or sorting the array.
- fieldName
the non-null field name
- values
the values
- options
the non-null push options
- returns
the update
-
abstract
def
pushEach[A](fieldName: String, values: Seq[A]): Update
Creates an update that adds each of the given values to the array value of the field with the given name.
Creates an update that adds each of the given values to the array value of the field with the given name.
- fieldName
the non-null field name
- values
the values
- returns
the update
-
abstract
def
rename(fieldName: String, newFieldName: String): Update
Creates an update that renames a field.
Creates an update that renames a field.
- fieldName
the non-null field name
- newFieldName
the non-null new field name
- returns
the update
-
abstract
def
set[A](fieldName: String, value: A): Update
Creates an update that sets the value of the field with the given name to the given value.
Creates an update that sets the value of the field with the given name to the given value.
- fieldName
the non-null field name
- value
the value, which may be null
- returns
the update
-
abstract
def
setOnInsert[A](fieldName: String, value: A): Update
Creates an update that sets the value of the field with the given name to the given value, but only if the update is an upsert that results in an insert of a document.
Creates an update that sets the value of the field with the given name to the given value, but only if the update is an upsert that results in an insert of a document.
- fieldName
the non-null field name
- value
the value, which may be null
- returns
the update ee UpdateOptions#upsert(boolean)
-
abstract
def
setOnInsert(value: Bson): Update
Creates an update that sets the values for the document, but only if the update is an upsert that results in an insert of a document.
Creates an update that sets the values for the document, but only if the update is an upsert that results in an insert of a document.
- value
the value
- returns
the update .0
- See also
UpdateOptions#upsert(boolean)
-
abstract
def
unset(fieldName: String): Update
Creates an update that deletes the field with the given name.
Creates an update that deletes the field with the given name.
- fieldName
the non-null field name
- returns
the update
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated