void InternalSchemaObjectMatchExpression::serialize(BSONObjBuilder* out) const { BSONObjBuilder objMatchBob(out->subobjStart(path())); BSONObjBuilder subBob(objMatchBob.subobjStart(kName)); _sub->serialize(&subBob); subBob.doneFast(); objMatchBob.doneFast(); }
void InternalSchemaFmodMatchExpression::serialize(BSONObjBuilder* out) const { BSONObjBuilder objMatchBob(out->subobjStart(path())); BSONArrayBuilder arrBuilder(objMatchBob.subarrayStart("$_internalSchemaFmod")); arrBuilder.append(_divisor); arrBuilder.append(_remainder); arrBuilder.doneFast(); objMatchBob.doneFast(); }