//CreateTimeSeriesCollection Does what it says on the tin
CreateTimeSeriesCollection Does what it says on the tin
// CreateTimeSeriesCollection Does what it says on the tin
func (db *DB) CreateTimeSeriesCollection(collectionName string) (err error) {
	ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
	timeSeriesCollectionOptions := options.TimeSeriesOptions{TimeField: "timestamp"}
	timeSeriesCollectionOptions.SetMetaField(MetaField).SetGranularity(Granularity)
	createOptions := options.CreateCollectionOptions{
		TimeSeriesOptions: &timeSeriesCollectionOptions,
	}
	err = db.Client.Database(db.DbName).CreateCollection(ctx, collectionName, &createOptions)
	return err
}
func ( db * DB ) CreateTimeSeriesCollection ( collectionName string ) ( err error ) { ctx , _ := context . WithTimeout ( context . Background ( ) , 10 * time . Second ) timeSeriesCollectionOptions := options . TimeSeriesOptions { TimeField : " " } timeSeriesCollectionOptions . SetMetaField ( MetaField ) . SetGranularity ( Granularity ) createOptions := options . CreateCollectionOptions { TimeSeriesOptions : & timeSeriesCollectionOptions , } err = db . Client . Database ( db . DbName ) . CreateCollection ( ctx , collectionName , & createOptions ) return err }
CreateTimeSeriesCollection Does what it says on the tin
CreateTimeSeriesCollection Does what it says on the tin
// Not sure why I have to do this - this way