summaryrefslogtreecommitdiff
path: root/src/mongo/db/timeseries
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/timeseries')
-rw-r--r--src/mongo/db/timeseries/timeseries_constants.h (renamed from src/mongo/db/timeseries/timeseries_field_names.h)9
-rw-r--r--src/mongo/db/timeseries/timeseries_index_schema_conversion_functions.cpp2
-rw-r--r--src/mongo/db/timeseries/timeseries_index_schema_conversion_functions_test.cpp2
3 files changed, 11 insertions, 2 deletions
diff --git a/src/mongo/db/timeseries/timeseries_field_names.h b/src/mongo/db/timeseries/timeseries_constants.h
index b6d24a78bd8..e9a6ebf80ba 100644
--- a/src/mongo/db/timeseries/timeseries_field_names.h
+++ b/src/mongo/db/timeseries/timeseries_constants.h
@@ -30,6 +30,8 @@
#pragma once
#include "mongo/base/string_data.h"
+#include "mongo/db/commands/create_gen.h"
+#include "mongo/util/string_map.h"
namespace mongo {
namespace timeseries {
@@ -49,5 +51,12 @@ static constexpr StringData kMetaFieldName = "metaField"_sd;
// These are hard-coded field names in index specs.
static constexpr StringData kKeyFieldName = "key"_sd;
+static const StringDataSet kAllowedCollectionCreationOptions{
+ CreateCommand::kStorageEngineFieldName,
+ CreateCommand::kIndexOptionDefaultsFieldName,
+ CreateCommand::kCollationFieldName,
+ CreateCommand::kTimeseriesFieldName,
+ CreateCommand::kExpireAfterSecondsFieldName};
+
} // namespace timeseries
} // namespace mongo
diff --git a/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions.cpp b/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions.cpp
index 1aa910b73e9..5909670ff08 100644
--- a/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions.cpp
+++ b/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions.cpp
@@ -33,7 +33,7 @@
#include "mongo/db/timeseries/timeseries_index_schema_conversion_functions.h"
-#include "mongo/db/timeseries/timeseries_field_names.h"
+#include "mongo/db/timeseries/timeseries_constants.h"
#include "mongo/db/timeseries/timeseries_gen.h"
#include "mongo/logv2/log.h"
#include "mongo/logv2/redaction.h"
diff --git a/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions_test.cpp b/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions_test.cpp
index 9eac6a67236..2763b5a3385 100644
--- a/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions_test.cpp
+++ b/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions_test.cpp
@@ -32,7 +32,7 @@
#include "mongo/db/timeseries/timeseries_index_schema_conversion_functions.h"
#include "mongo/bson/bsonobj.h"
-#include "mongo/db/timeseries/timeseries_field_names.h"
+#include "mongo/db/timeseries/timeseries_constants.h"
#include "mongo/db/timeseries/timeseries_gen.h"
#include "mongo/unittest/unittest.h"