get Decimal128
fun getDecimal128(key: String, defaultValue: BsonDecimal128): BsonDecimal128
Content copied to clipboard
If the document does not contain the given key, return the given default value. Otherwise, gets the value of the key as a BsonDecimal128.
Return
the value of the key as a BsonDecimal128
Parameters
key
the key
default Value
the default value
Throws
if the document contains the key but the value is not of the expected type
Gets the value of the key if it is a BsonDecimal128, or throws if not.
Return
the value of the key as a BsonDecimal128
Parameters
key
the key
Throws
if the document does not contain the key or the value is not of the expected type