Home Manual Reference Source Test

Variable

Static Public Summary
public

Precision is a map of available Influx time precisions.

public

TagEscaper escapes tag keys, tag values, and field keys.

Static Public

public Precision: Object<String, String> source

import {Precision} from 'influx/src/grammar/times.js'

Precision is a map of available Influx time precisions.

Example:

console.log(Precision.Hours); // => 'h'
console.log(Precision.Minutes); // => 'm'
console.log(Precision.Seconds); // => 's'
console.log(Precision.Milliseconds); // => 'ms'
console.log(Precision.Microseconds); // => 'u'
console.log(Precision.Nanoseconds); // => 'n'

public escape: Object source

import {escape} from 'influx/src/grammar/escape.js'

TagEscaper escapes tag keys, tag values, and field keys.

Properties:

NameTypeAttributeDescription
quoted function(s: string): string

Escapes and wraps quoted values, such as database names.

stringLit function(s: string): string

Escapes and wraps string literals.

measurement function(s: string): string

Escapes measurement names on the line protocol.

tag function(s: string): string

Escapes tag keys, take values, and field keys on the line protocol.

Example:

console.log(escape.quoted('my_"db')); // => "my_\"db"
console.log(escape.stringLit('hello\'world')); // => 'hello\'world'

console.log(escape.measurement('my measurement')); // => my\ measurement
console.log(escape.tag('my tag=')); // => my\ tag\=