-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathmysql.ts
586 lines (585 loc) · 14.4 KB
/
mysql.ts
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
const completionSpec: Fig.Spec = {
name: "mysql",
description: "Mysql is a terminal-based front-end to MySQL",
args: {},
options: [
{
name: "--auto-rehash",
description: "Enable automatic rehashing",
},
{
name: "--auto-vertical-output",
description: "Enable automatic vertical result set display",
},
{
name: ["--batch", "-B"],
description: "Do not use history file",
},
{
name: "--binary-as-hex",
description: "Display binary values in hexadecimal notation",
},
{
name: "--binary-mode",
description:
"Disable \\r\\n - to - \\n translation and treatment of \\0 as end-of-query",
},
{
name: "--bind-address",
description: "Use specified network interface to connect to MySQL Server",
args: {
name: "ip_address",
},
},
{
name: "--character-sets-dir",
description: "Directory where character sets are installed",
args: {
name: "dir_name",
template: "folders",
description: "Directory where character sets are installed",
},
},
{
name: "--column-names",
description: "Write column names in results",
},
{
name: "--column-type-info",
description: "Display result set metadata",
},
{
name: ["--comments", "-c"],
description:
"Whether to retain or strip comments in statements sent to the server",
},
{
name: ["--compress", "-C"],
description: "Compress all information sent between client and server",
},
{
name: "--compression-algorithms",
description: "Permitted compression algorithms for connections to server",
args: {
name: "value",
suggestions: [
{ name: "zlib" },
{ name: "zstd" },
{ name: "uncompressed" },
],
},
},
{
name: "--connect-expired-password",
description:
"Indicate to server that client can handle expired-password sandbox mode",
},
{
name: "--connect-timeout",
description: "Number of seconds before connection timeout",
args: {
name: "value",
},
},
{
name: ["-D", "--database"],
description: "The database to use",
args: {
name: "db_name",
},
},
{
name: "--debug",
description:
"Write debugging log; supported only if MySQL was built with debugging support",
},
{
name: "--debug-check",
description: "Print debugging information when program exits",
},
{
name: ["-T", "--debug-info"],
description:
"Print debugging information, memory, and CPU statistics when program exits",
},
{
name: "--default-auth",
description: "Authentication plugin to use",
args: {
name: "plugin",
},
},
{
name: "--default-character-set",
description: "Specify default character set",
args: {
name: "charset_name",
},
},
{
name: "--defaults-extra-file",
description: "Read named option file in addition to usual option files",
args: {
name: "file_name",
template: "filepaths",
},
},
{
name: "--defaults-file",
description: "Read only named option file",
args: {
name: "file_name",
template: "filepaths",
},
},
{
name: "--defaults-group-suffix",
description: "Option group suffix value",
args: {
name: "str",
},
},
{
name: "--delimiter",
description: "Set the statement delimiter",
args: {
name: "str",
},
},
{
name: "--disable-named-commands",
description:
"Disable named commands. Use the \\* form only, or use named commands only at the beginning of a line ending with a semicolon (;). mysql starts with this option enabled by default. However, even with this option, long-format commands still work from the first line",
},
{
name: "--dns-srv-name",
description: "Use DNS SRV lookup for host information",
args: {
name: "name",
},
},
{
name: "--enable-cleartext-plugin",
description: "Enable cleartext authentication plugin",
},
{
name: ["-e", "--execute"],
description: "Execute the statement and quit",
args: {
name: "statement",
},
},
{
name: ["-f", "--force"],
description: "Continue even if an SQL error occurs",
},
{
name: "--get-server-public-key",
description: "Request RSA public key from server",
},
{
name: ["--help", "-?"],
description: "Display help message and exit",
},
{
name: "--histignore",
description: "Patterns specifying which statements to ignore for logging",
},
{
name: ["-h", "--host"],
description: "Host on which MySQL server is located",
args: {
name: "host_name",
},
},
{
name: ["-H", "--html"],
description: "Produce HTML output",
},
{
name: ["-i", "--ignore-spaces"],
description: "Ignore spaces after function names",
},
{
name: "--init-command",
description: "SQL statement to execute after connecting",
args: {
name: "command",
},
insertValue: "{cursor}'",
},
{
name: "--line-numbers",
description: "Write line numbers for errors",
},
{
name: "--load-data-local-dir",
description: "Directory for files named in LOAD DATA LOCAL statements",
args: {
name: "dir_name",
template: "folders",
},
},
{
name: "--local-infile",
description: "Enable or disable for LOCAL capability for LOAD DATA",
args: {
name: "is-local-inflie",
suggestions: [
{
name: "0",
description: "Disable",
},
{
name: "1",
description: "Enable",
},
],
},
},
{
name: "--login-path",
description: "Read login path options from .mylogin.cnf",
args: {
name: "name",
},
},
{
name: "--max-allowed-packet",
description: "Maximum packet length to send to or receive from server",
args: {
name: "value",
},
},
{
name: "--max-join-size",
description:
"The automatic limit for rows in a join when using --safe-updates",
args: {
name: "value",
},
},
{
name: ["-G", "--named-commands"],
description: "Enable named mysql commands",
},
{
name: "--net-buffer-length",
description: "Buffer size for TCP/IP and socket communication",
args: {
name: "value",
},
},
{
name: "--network-namespace",
description: "Specify network namespace",
args: {
name: "name",
},
},
{
name: ["-A", "--no-auto-rehash"],
description: "Disable automatic rehashing",
},
{
name: ["--no-beep", "-b"],
description: "Do not beep when errors occur",
},
{
name: "--no-defaults",
description: "Read no option files",
},
{
name: ["-o", "--one-database"],
description:
"Ignore statements except those for the default database named on the command line",
},
{
name: "--pager",
description: "Use the given command for paging query output",
args: {
name: "command",
},
},
{
name: ["-p", "--password"],
description: "Password to use when connecting to server",
args: {
name: "password",
},
},
{
name: ["--pipe", "-W"],
description: "Connect to server using named pipe (Windows only)",
},
{
name: "--plugin-dir",
description: "Directory where plugins are installed",
args: {
name: "dir_name",
template: "folders",
},
},
{
name: ["-P", "--port"],
description: "TCP/IP port number for connection",
args: {
name: "port_num",
},
},
{
name: "--print-defaults",
description: "Print default options",
},
{
name: "--prompt",
description: "Set the prompt to the specified format",
args: {
name: "format_str",
},
},
{
name: "--protocol",
description: "Transport protocol to use",
args: {
name: "format_str",
suggestions: [
{ name: "TCP" },
{ name: "SOCKET" },
{ name: "PIPE" },
{ name: "MEMORY" },
],
},
},
{
name: ["-q", "--quick"],
description: "Do not cache each query result",
},
{
name: ["-r", "--raw"],
description: "Write column values without escape conversion",
},
{
name: "--reconnect",
description:
"If the connection to the server is lost, automatically try to reconnect",
},
{
name: ["-U", "--safe-updates", "--i-am-a-dummy"],
description:
"Allow only UPDATE and DELETE statements that specify key values",
},
{
name: "--select-limit",
description:
"The automatic limit for SELECT statements when using --safe-updates",
args: {
name: "value",
},
},
{
name: "--server-public-key-path",
description: "Path name to file containing RSA public key",
args: {
name: "filename",
template: "filepaths",
},
},
{
name: "--shared-memory-base-name",
description:
"Shared-memory name for shared-memory connections (Windows only)",
args: {
name: "name",
},
},
{
name: "--show-warnings",
description: "Show warnings after each statement if there are any",
},
{
name: "--sigint-ignore",
description:
"Ignore SIGINT signals (typically the result of typing Control+C)",
},
{
name: ["-s", "--silent"],
description:
"Silent mode. Produce less output. This option can be given multiple times to produce less and less output",
isRepeatable: true,
},
{
name: "--skip-auto-rehash",
description: "Disable automatic rehashing",
},
{
name: ["-N", "--skip-column-names"],
description: "Do not write column names in results",
},
{
name: ["-L", "--skip-line-numbers"],
description: "Skip line numbers for errors",
},
{
name: "--skip-named-commands",
description: "Disable named mysql commands",
},
{
name: "--skip-pager",
description: "Disable paging",
},
{
name: "--skip-reconnect",
description: "Disable reconnecting",
},
{
name: ["-S", "--socket"],
description:
'Unix socket file or Windows named pipe to use"File that contains list of trusted SSL Certificate Authorities"',
args: {
name: "name",
},
},
{
name: "--ssl-ca",
description:
"File that contains list of trusted SSL Certificate Authorities",
args: {
name: "filename",
template: "filepaths",
},
},
{
name: "--ssl-capath",
description:
"Directory that contains trusted SSL Certificate Authority certificate files",
args: {
name: "dirname",
template: "folders",
},
},
{
name: "--ssl-cert",
description: "File that contains X.509 certificate",
args: {
name: "filename",
template: "filepaths",
},
},
{
name: "--ssl-cipher",
description: "Permissible ciphers for connection encryption",
},
{
name: "--ssl-crl",
description: "File that contains certificate revocation lists",
args: {
name: "filename",
template: "filepaths",
},
},
{
name: "--ssl-crlpath",
description: "Directory that contains certificate revocation-list files",
args: {
name: "dirname",
template: "folders",
},
},
{
name: "--ssl-fips-mode",
description: "Whether to enable FIPS mode on client side",
args: {
name: "mode",
suggestions: [{ name: "OFF" }, { name: "ON" }, { name: "STRICT" }],
},
},
{
name: "--ssl-key",
description: "File that contains X.509 key",
args: {
name: "filename",
template: "filepaths",
},
},
{
name: "--ssl-mode",
description: "Desired security state of connection to server",
},
{
name: ["-j", "--syslog"],
description: "Log interactive statements to syslog",
},
{
name: ["-t", "--table"],
description: "Display output in tabular format",
},
{
name: "--tee",
description: "Append a copy of output to named file",
args: {
name: "file_name",
template: "filepaths",
},
},
{
name: "--tls-ciphersuites",
description: "Permissible TLSv1.3 ciphersuites for encrypted connections",
args: {
name: "ciphersuite_list",
template: "filepaths",
},
},
{
name: "--tls-version",
description: "Permissible TLS protocols for encrypted connections",
args: {
name: "protocol_list",
},
},
{
name: ["-n", "--unbuffered"],
description: "Flush the buffer after each query",
},
{
name: ["-u", "--user"],
description: "MySQL user name to use when connecting to server",
args: {
name: "user_name",
},
},
{
name: ["-v", "--verbose"],
description: "Verbose mode",
},
{
name: ["-V", "--version"],
description: "Display version information and exit",
},
{
name: ["-E", "--vertical"],
description:
"Print query output rows vertically (one line per column value)",
},
{
name: ["-w", "--wait"],
description:
"If the connection cannot be established, wait and retry instead of aborting",
},
{
name: ["-X", "--xml"],
description: "Produce XML output",
},
{
name: "--zstd-compression-level",
description:
"Compression level for connections to server that use zstd compression",
args: {
name: "level",
description:
"Compression level between 1-22. The default zstd compression level is 3. The compression level setting has no effect on connections that do not use zstd compression",
},
},
],
};
export default completionSpec;