summaryrefslogtreecommitdiff
path: root/src/mongo/db/timeseries/timeseries_update_delete_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/timeseries/timeseries_update_delete_util.h')
-rw-r--r--src/mongo/db/timeseries/timeseries_update_delete_util.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/timeseries/timeseries_update_delete_util.h b/src/mongo/db/timeseries/timeseries_update_delete_util.h
index 12cb1887ac3..43a7bf6850f 100644
--- a/src/mongo/db/timeseries/timeseries_update_delete_util.h
+++ b/src/mongo/db/timeseries/timeseries_update_delete_util.h
@@ -66,4 +66,15 @@ write_ops::UpdateOpEntry translateUpdate(const BSONObj& translatedQuery,
const write_ops::UpdateModification& updateMod,
StringData metaField);
+// TODO: SERVER-58394 Remove this method and combine its logic with
+// timeseries::replaceTimeseriesQueryMetaFieldName().
+/**
+ * Recurses through the mutablebson element query and replaces any occurrences of the
+ * metaField with "meta" accounting for queries that may be in dot notation. shouldReplaceFieldValue
+ * is set for $expr queries when "$" + the metaField should be substituted for "$meta".
+ */
+void replaceTimeseriesQueryMetaFieldName(mutablebson::Element elem,
+ const StringData& metaField,
+ bool shouldReplaceFieldValue = false);
+
} // namespace mongo::timeseries