Ultimo aggiornamento Nuova versione del Sito !

This commit is contained in:
Paolo Arena
2020-05-14 17:23:17 +02:00
parent 0565339bab
commit 59910ddec7
9 changed files with 457 additions and 105 deletions

28
docs/query_mongodb.js Normal file
View File

@@ -0,0 +1,28 @@
db.getCollection('users').aggregate([
{ $match: { idapp: '7', username:'Emycapp' } },
{
$lookup: {
from: "naves",
as: "ingr",
let: { ind_order: '$ind_order' },
pipeline: [
{
$match: {
$expr: {
$and: [
{ $eq: ['$ind_order', '$$ind_order'] },
]
}
}
}
]
}
},
{
$replaceRoot: { newRoot: { $mergeObjects: [{ $arrayElemAt: ["$ingr", 0] }, "$$ROOT"] } }
},
{
$match: { made_gift: { $exists: true } }
}
])