influx 5.0.3 → 5.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/lib/src/backoff/backoff.d.ts +15 -15
- package/lib/src/backoff/backoff.js +2 -1
- package/lib/src/backoff/exponential.d.ts +52 -52
- package/lib/src/backoff/exponential.js +40 -39
- package/lib/src/builder.d.ts +265 -265
- package/lib/src/builder.js +366 -365
- package/lib/src/doc.d.ts +315 -310
- package/lib/src/doc.js +340 -329
- package/lib/src/grammar/ds.d.ts +45 -45
- package/lib/src/grammar/ds.js +56 -55
- package/lib/src/grammar/escape.d.ts +25 -25
- package/lib/src/grammar/escape.js +108 -107
- package/lib/src/grammar/index.d.ts +3 -3
- package/lib/src/grammar/index.js +8 -7
- package/lib/src/grammar/times.d.ts +74 -74
- package/lib/src/grammar/times.js +325 -318
- package/lib/src/host.d.ts +26 -24
- package/lib/src/host.js +34 -32
- package/lib/src/index.d.ts +659 -653
- package/lib/src/index.js +870 -866
- package/lib/src/pool.d.ts +149 -148
- package/lib/src/pool.js +344 -333
- package/lib/src/results.d.ts +118 -119
- package/lib/src/results.js +146 -139
- package/lib/src/schema.d.ts +58 -58
- package/lib/src/schema.js +117 -116
- package/package.json +10 -10
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
export interface INanoDate extends Date {
|
|
2
|
-
/**
|
|
3
|
-
* Returns the unix nanoseconds timestamp as a string.
|
|
4
|
-
*/
|
|
5
|
-
getNanoTime(): string;
|
|
6
|
-
/**
|
|
7
|
-
* Formats the date as an ISO RFC3339 timestamp with nanosecond precision.
|
|
8
|
-
*/
|
|
9
|
-
toNanoISOString(): string;
|
|
10
|
-
}
|
|
11
|
-
export declare type TimePrecision = 'n' | 'u' | 'ms' | 's' | 'm' | 'h';
|
|
12
|
-
/**
|
|
13
|
-
* Precision is a map of available Influx time precisions.
|
|
14
|
-
* @type {Object.<String, String>}
|
|
15
|
-
* @example
|
|
16
|
-
* console.log(Precision.Hours); // => 'h'
|
|
17
|
-
* console.log(Precision.Minutes); // => 'm'
|
|
18
|
-
* console.log(Precision.Seconds); // => 's'
|
|
19
|
-
* console.log(Precision.Milliseconds); // => 'ms'
|
|
20
|
-
* console.log(Precision.Microseconds); // => 'u'
|
|
21
|
-
* console.log(Precision.Nanoseconds); // => 'ns'
|
|
22
|
-
*/
|
|
23
|
-
export declare const Precision: {
|
|
24
|
-
Hours: string;
|
|
25
|
-
Microseconds: string;
|
|
26
|
-
Milliseconds: string;
|
|
27
|
-
Minutes: string;
|
|
28
|
-
Nanoseconds: string;
|
|
29
|
-
Seconds: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Covers a nanoseconds unix timestamp to a INanoDate for node-influx. The
|
|
33
|
-
* timestamp is provided as a string to prevent precision loss.
|
|
34
|
-
*
|
|
35
|
-
* Please see [A Moment for Times](https://node-influx.github.io/manual/
|
|
36
|
-
* usage.html#a-moment-for-times) for a more complete and eloquent explanation
|
|
37
|
-
* of time handling in this module.
|
|
38
|
-
*
|
|
39
|
-
* @param {String} timestamp
|
|
40
|
-
* @returns {INanoDate}
|
|
41
|
-
* @example
|
|
42
|
-
* const date = toNanoDate('1475985480231035600')
|
|
43
|
-
*
|
|
44
|
-
* // You can use the returned Date as a normal date:
|
|
45
|
-
* expect(date.getTime()).to.equal(1475985480231);
|
|
46
|
-
*
|
|
47
|
-
* // We decorate it with two additional methods to read
|
|
48
|
-
* // nanosecond-precision results:
|
|
49
|
-
* expect(date.getNanoTime()).to.equal('1475985480231035600');
|
|
50
|
-
* expect(date.toNanoISOString()).to.equal('2016-10-09T03:58:00.231035600Z');
|
|
51
|
-
*/
|
|
52
|
-
export declare function toNanoDate(timestamp: string): INanoDate;
|
|
53
|
-
/**
|
|
54
|
-
* formatDate converts the Date instance to Influx's date query format.
|
|
55
|
-
* @private
|
|
56
|
-
*/
|
|
57
|
-
export declare function formatDate(date: Date): string;
|
|
58
|
-
/**
|
|
59
|
-
* Converts a Date instance to a timestamp with the specified time precision.
|
|
60
|
-
* @private
|
|
61
|
-
*/
|
|
62
|
-
export declare function dateToTime(date: Date | INanoDate, precision: TimePrecision): string;
|
|
63
|
-
/**
|
|
64
|
-
* Converts an ISO-formatted data or unix timestamp to a Date instance. If
|
|
65
|
-
* the precision is finer than 'ms' the returned value will be a INanoDate.
|
|
66
|
-
* @private
|
|
67
|
-
*/
|
|
68
|
-
export declare function isoOrTimeToDate(stamp: string | number, precision?: TimePrecision): INanoDate;
|
|
69
|
-
/**
|
|
70
|
-
* Converts a timestamp to a string with the correct precision. Assumes
|
|
71
|
-
* that raw number and string instances are already in the correct precision.
|
|
72
|
-
* @private
|
|
73
|
-
*/
|
|
74
|
-
export declare function castTimestamp(timestamp: string | number | Date, precision: TimePrecision): string;
|
|
1
|
+
export interface INanoDate extends Date {
|
|
2
|
+
/**
|
|
3
|
+
* Returns the unix nanoseconds timestamp as a string.
|
|
4
|
+
*/
|
|
5
|
+
getNanoTime(): string;
|
|
6
|
+
/**
|
|
7
|
+
* Formats the date as an ISO RFC3339 timestamp with nanosecond precision.
|
|
8
|
+
*/
|
|
9
|
+
toNanoISOString(): string;
|
|
10
|
+
}
|
|
11
|
+
export declare type TimePrecision = 'n' | 'u' | 'ms' | 's' | 'm' | 'h';
|
|
12
|
+
/**
|
|
13
|
+
* Precision is a map of available Influx time precisions.
|
|
14
|
+
* @type {Object.<String, String>}
|
|
15
|
+
* @example
|
|
16
|
+
* console.log(Precision.Hours); // => 'h'
|
|
17
|
+
* console.log(Precision.Minutes); // => 'm'
|
|
18
|
+
* console.log(Precision.Seconds); // => 's'
|
|
19
|
+
* console.log(Precision.Milliseconds); // => 'ms'
|
|
20
|
+
* console.log(Precision.Microseconds); // => 'u'
|
|
21
|
+
* console.log(Precision.Nanoseconds); // => 'ns'
|
|
22
|
+
*/
|
|
23
|
+
export declare const Precision: Readonly<{
|
|
24
|
+
Hours: string;
|
|
25
|
+
Microseconds: string;
|
|
26
|
+
Milliseconds: string;
|
|
27
|
+
Minutes: string;
|
|
28
|
+
Nanoseconds: string;
|
|
29
|
+
Seconds: string;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Covers a nanoseconds unix timestamp to a INanoDate for node-influx. The
|
|
33
|
+
* timestamp is provided as a string to prevent precision loss.
|
|
34
|
+
*
|
|
35
|
+
* Please see [A Moment for Times](https://node-influx.github.io/manual/
|
|
36
|
+
* usage.html#a-moment-for-times) for a more complete and eloquent explanation
|
|
37
|
+
* of time handling in this module.
|
|
38
|
+
*
|
|
39
|
+
* @param {String} timestamp
|
|
40
|
+
* @returns {INanoDate}
|
|
41
|
+
* @example
|
|
42
|
+
* const date = toNanoDate('1475985480231035600')
|
|
43
|
+
*
|
|
44
|
+
* // You can use the returned Date as a normal date:
|
|
45
|
+
* expect(date.getTime()).to.equal(1475985480231);
|
|
46
|
+
*
|
|
47
|
+
* // We decorate it with two additional methods to read
|
|
48
|
+
* // nanosecond-precision results:
|
|
49
|
+
* expect(date.getNanoTime()).to.equal('1475985480231035600');
|
|
50
|
+
* expect(date.toNanoISOString()).to.equal('2016-10-09T03:58:00.231035600Z');
|
|
51
|
+
*/
|
|
52
|
+
export declare function toNanoDate(timestamp: string): INanoDate;
|
|
53
|
+
/**
|
|
54
|
+
* formatDate converts the Date instance to Influx's date query format.
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
export declare function formatDate(date: Date): string;
|
|
58
|
+
/**
|
|
59
|
+
* Converts a Date instance to a timestamp with the specified time precision.
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
export declare function dateToTime(date: Date | INanoDate, precision: TimePrecision): string;
|
|
63
|
+
/**
|
|
64
|
+
* Converts an ISO-formatted data or unix timestamp to a Date instance. If
|
|
65
|
+
* the precision is finer than 'ms' the returned value will be a INanoDate.
|
|
66
|
+
* @private
|
|
67
|
+
*/
|
|
68
|
+
export declare function isoOrTimeToDate(stamp: string | number, precision?: TimePrecision): INanoDate;
|
|
69
|
+
/**
|
|
70
|
+
* Converts a timestamp to a string with the correct precision. Assumes
|
|
71
|
+
* that raw number and string instances are already in the correct precision.
|
|
72
|
+
* @private
|
|
73
|
+
*/
|
|
74
|
+
export declare function castTimestamp(timestamp: string | number | Date, precision: TimePrecision): string;
|