Table of Contents

Class TimeSeriesOptions

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Defines the time series options to use when creating a time series collection. See https://www.mongodb.com/docs/manual/reference/command/create/ for supported options and https://www.mongodb.com/docs/manual/core/timeseries-collections/ for more information on time series collections.

public class TimeSeriesOptions
Inheritance
TimeSeriesOptions
Inherited Members

Constructors

TimeSeriesOptions(string, Optional<string>, Optional<TimeSeriesGranularity?>, Optional<int?>, Optional<int?>)

Initializes a new instance of the TimeSeriesOptions class.

Properties

BucketMaxSpanSeconds

The maximum time between timestamps in the same bucket.

BucketRoundingSeconds

The interval used to round down the first timestamp when opening a new bucket.

Granularity

The coarse granularity of time series data.

MetaField

The name of the field which contains metadata in each time series document.

TimeField

The name of the field which contains the date and time in each time series document.

Methods

ToBsonDocument()

The BSON representation of the time series options.