y
Size: a a a
y
AS
{
from: 'service',
let: {
instId: '$instId'
},
pipeline: [
{$match :{
'$$instId': '33241889763'
}}
],
as: 'services'
}y
y
{
from: 'service',
let: {
instId: '$instId'
},
pipeline: [
{$match :{
'$$instId': '33241889763'
}}
],
as: 'services'
}y
AS
AS
M
y
M
M
DS
db.getCollection("example_collection").updateOne(
{"_id": ObjectId("5e9373918cba124fb1d979db")},
[
{$set: {
"string": {$cond: [{$eq: ["$string", "value1"]}, "aaaa", "bbbb"]}
}}
]
)DS
[{
"_id" : ObjectId("5e9373918cba124fb1d979d9"),
"string" : "value1",
"int" : NumberInt(1),
"float" : 11.11
},
{
"_id" : ObjectId("5e9373918cba124fb1d979da"),
"string" : "value2",
"int" : NumberInt(2),
"float" : 22.22
},
{
"_id" : ObjectId("5e9373918cba124fb1d979db"),
"string" : "value3",
"int" : NumberInt(2),
"float" : 33.33
}]M
[{
"_id" : ObjectId("5e9373918cba124fb1d979d9"),
"string" : "value1",
"int" : NumberInt(1),
"float" : 11.11
},
{
"_id" : ObjectId("5e9373918cba124fb1d979da"),
"string" : "value2",
"int" : NumberInt(2),
"float" : 22.22
},
{
"_id" : ObjectId("5e9373918cba124fb1d979db"),
"string" : "value3",
"int" : NumberInt(2),
"float" : 33.33
}]M
DS
db.getCollection("example_collection").updateOne(
{"_id": ObjectId("5e9373918cba124fb1d979db")},
[
{$set: {
"string": {
$cond: [{$and: [{$eq: ["$string", "value1"]}, {$eq: ["$int", 1]}]}, "aaaa", "bbbb"]}}}
]
)DS
M