SetStage interface
Home > @cbnsndwch/zero-contracts > SetStage
SetStage interface
Add computed fields stage - equivalent to MongoDB's $addFields operator.
Adds new fields to documents or replaces existing fields with computed values. Uses the same expression syntax as $project, but retains all existing fields.
Signature:
interface SetStageExample
{
$set: {
isOwner: { $eq: ['$role', 'owner'] },
fullName: { $concat: ['$firstName', ' ', '$lastName'] }
}
}Properties
Property
Modifiers
Type
Description
How was this page?