Home Manual Reference Source Test
import {Measurement} from 'influx'
public class | source

Measurement

Measurement creates a reference to a particular measurement. You can reference it solely by its name, but you can also specify the retention policy and database it lives under.

Example:

m.name('my_measurement') // "my_measurement"
m.name('my_measurement').policy('one_day') // "one_day"."my_measurement"
m.name('my_measurement').policy('one_day').db('mydb') // "mydb".one_day"."my_measurement"

Method Summary

Public Methods
public

Sets the database name.

public

Sets the measurement name.

public

policy(retentionPolicy: String): Measurement

Sets the retention policy name.

public

Converts the measurement into its InfluxQL representation.

Public Methods

public db(db: String): Measurement source

Sets the database name.

Params:

NameTypeAttributeDescription
db String

Return:

Measurement

public name(name: String): Measurement source

Sets the measurement name.

Params:

NameTypeAttributeDescription
name String

Return:

Measurement

public policy(retentionPolicy: String): Measurement source

Sets the retention policy name.

Params:

NameTypeAttributeDescription
retentionPolicy String

Return:

Measurement

public toString(): String source

Converts the measurement into its InfluxQL representation.

Return:

String

Throw:

Error

if a measurement name is not provided