-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconstant.ts
More file actions
96 lines (86 loc) · 1.97 KB
/
Copy pathconstant.ts
File metadata and controls
96 lines (86 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
export interface IndexableString {
[index: number]: string
}
export interface StringIndexable {
[index: string]: number
}
export const BinaryQueryMessage: bigint = BigInt(6);
export const FetchRawBlockMessage: bigint = BigInt(7);
export const TDengineTypeName: IndexableString = {
0: 'NULL',
1: 'BOOL',
2: 'TINYINT',
3: 'SMALLINT',
4: 'INT',
5: 'BIGINT',
6: 'FLOAT',
7: 'DOUBLE',
8: 'VARCHAR',
9: 'TIMESTAMP',
10: 'NCHAR',
11: 'TINYINT UNSIGNED',
12: 'SMALLINT UNSIGNED',
13: 'INT UNSIGNED',
14: 'BIGINT UNSIGNED',
15: 'JSON',
16: 'VARBINARY',
20: 'GEOMETRY',
}
export const ColumnsBlockType: StringIndexable = {
'SOLID': 0,
'VARCHAR': 1,
'NCHAR': 2,
'GEOMETRY': 3,
'VARBINARY':4,
}
export enum TDengineTypeCode {
NULL = 0,
BOOL = 1,
TINYINT = 2,
SMALLINT = 3,
INT = 4,
BIGINT = 5,
FLOAT = 6,
DOUBLE = 7,
BINARY = 8,
VARCHAR = 8,
TIMESTAMP = 9,
NCHAR = 10,
TINYINT_UNSIGNED = 11,
SMALLINT_UNSIGNED = 12,
INT_UNSIGNED = 13,
BIGINT_UNSIGNED = 14,
JSON = 15,
VARBINARY = 16,
GEOMETRY = 20,
}
export enum TSDB_OPTION_CONNECTION {
TSDB_OPTION_CONNECTION_CHARSET, // charset, Same as the scope supported by the system
TSDB_OPTION_CONNECTION_TIMEZONE, // timezone, Same as the scope supported by the system
TSDB_OPTION_CONNECTION_USER_IP, // user ip
TSDB_OPTION_CONNECTION_USER_APP, // user app
}
export const TDenginePrecision: IndexableString = {
0: 'MILLISECOND',
1: "MICROSECOND",
2: "NANOSECOND",
}
export const TDengineTypeLength: StringIndexable = {
'BOOL': 1,
'TINYINT': 1,
'SMALLINT': 2,
'INT': 4,
'BIGINT': 8,
'FLOAT': 4,
'DOUBLE': 8,
'TIMESTAMP': 8,
'TINYINT UNSIGNED': 1,
'SMALLINT UNSIGNED': 2,
'INT UNSIGNED': 4,
'BIGINT UNSIGNED': 8,
}
export const PrecisionLength: StringIndexable = {
'ms': 13,
'us': 16,
'ns': 19
}