-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathinformation.ts
More file actions
133 lines (126 loc) · 2.77 KB
/
Copy pathinformation.ts
File metadata and controls
133 lines (126 loc) · 2.77 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/**
* @name information_schema
* @type schema
*/
export interface InformationSchema {
TABLES: Tables
COLUMNS: Columns
VIEWS: Views
TABLE_CONSTRAINTS: TableConstraints
KEY_COLUMN_USAGE: KeyColumnUsage
STATISTICS: Statistics
}
/**
* @name TABLES
* @type table
*/
interface Tables {
TABLE_CATALOG: string
TABLE_SCHEMA: string
TABLE_NAME: string
TABLE_TYPE: 'BASE TABLE' | 'VIEW' | 'SYSTEM VIEW'
ENGINE: string
VERSION: number
ROW_FORMAT: string
TABLE_ROWS: number
AVG_ROW_LENGTH: number
DATA_LENGTH: number
MAX_DATA_LENGTH: number
INDEX_LENGTH: number
DATA_FREE: number
AUTO_INCREMENT: number | null
CREATE_TIME: string
UPDATE_TIME: string
CHECK_TIME: string | null
TABLE_COLLATION: string | null
CHECKSUM: number | null
CREATE_OPTIONS: string | null
TABLE_COMMENT: string | null
}
/**
* @name VIEWS
* @type table
*/
interface Views {
TABLE_CATALOG: string
TABLE_SCHEMA: string
TABLE_NAME: string
VIEW_DEFINITION: string
CHECK_OPTION: 'NONE' | 'CASCADE' | 'LOCAL'
IS_UPDATABLE: 'YES' | 'NO'
DEFINER: string
SECURITY_TYPE: 'DEFINER' | 'INVOKER'
CHARACTER_SET_CLIENT: string
COLLATION_CONNECTION: string
}
/**
* @name COLUMNS
* @type table
*/
interface Columns {
TABLE_CATALOG: string
TABLE_SCHEMA: string
TABLE_NAME: string
COLUMN_NAME: string
ORDINAL_POSITION: number
COLUMN_DEFAULT: string | null
IS_NULLABLE: 'YES' | 'NO'
DATA_TYPE: string
CHARACTER_MAXIMUM_LENGTH: number | null
CHARACTER_OCTET_LENGTH: number | null
NUMERIC_PRECISION: number | null
NUMERIC_SCALE: number | null
DATETIME_PRECISION: number | null
CHARACTER_SET_NAME: string | null
COLLATION_NAME: string | null
COLUMN_TYPE: string
COLUMN_KEY: 'PRI' | 'UNI' | 'MUL' | ''
EXTRA: string
PRIVILEGES: string
COLUMN_COMMENT: string
GENERATION_EXPRESSION: string
SRS_ID: number
}
/**
* @name TABLE_CONSTRAINTS
* @type table
*/
interface TableConstraints {
CONSTRAINT_CATALOG: string
CONSTRAINT_SCHEMA: string
CONSTRAINT_NAME: string
TABLE_SCHEMA: string
TABLE_NAME: string
CONSTRAINT_TYPE: 'PRIMARY KEY' | 'UNIQUE' | 'FOREIGN KEY'
ENFORCED: 'YES' | 'NO'
}
/**
* @name KEY_COLUMN_USAGE
* @type table
*/
interface KeyColumnUsage {
CONSTRAINT_CATALOG: string
CONSTRAINT_SCHEMA: string
CONSTRAINT_NAME: string
TABLE_CATALOG: string
TABLE_SCHEMA: string
TABLE_NAME: string
COLUMN_NAME: string
ORDINAL_POSITION: number
POSITION_IN_UNIQUE_CONSTRAINT: number | null
REFERENCED_TABLE_SCHEMA: string | null
REFERENCED_TABLE_NAME: string | null
REFERENCED_COLUMN_NAME: string | null
}
/**
* @name STATISTICS
* @type table
*/
export interface Statistics {
TABLE_SCHEMA: string
TABLE_NAME: string
INDEX_NAME: string
COLUMN_NAME: string
NON_UNIQUE: number
}
export type MysqlStatistics = Statistics