-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcapability.go
89 lines (86 loc) · 2.13 KB
/
capability.go
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
package flag
type Capability uint32
// Capability Flags: https://dev.mysql.com/doc/internals/en/capability-flags.html
const (
ClientLongPassword Capability = 1 << iota
ClientFoundRows
ClientLongFlag
ClientConnectWithDB
ClientNoSchema
ClientCompress
ClientODBC
ClientLocalFiles
ClientIgnoreSpace
ClientProtocol41
ClientInteractive
ClientSSL
ClientIgnoreSigpipe
ClientTransactions
ClientReserved
ClientSecureConnection
ClientMultiStatements
ClientMultiResults
ClientPsMultiResults
ClientPluginAuth
ClientConnectAttrs
ClientPluginAuthLenencClientData
ClientCanHandleExpiredPasswords
ClientSessionTrack
ClientDeprecateEOF
)
func (c Capability) String() string {
switch c {
case ClientLongPassword:
return "CLIENT_LONG_PASSWORD"
case ClientFoundRows:
return "CLIENT_FOUND_ROWS"
case ClientLongFlag:
return "CLIENT_LONG_FLAG"
case ClientConnectWithDB:
return "CLIENT_CONNECT_WITH_DB"
case ClientNoSchema:
return "CLIENT_NO_SCHEMA"
case ClientCompress:
return "CLIENT_COMPRESS"
case ClientODBC:
return "CLIENT_ODBC"
case ClientLocalFiles:
return "CLIENT_LOCAL_FILES"
case ClientIgnoreSpace:
return "CLIENT_IGNORE_SPACE"
case ClientProtocol41:
return "CLIENT_PROTOCOL_41"
case ClientInteractive:
return "CLIENT_INTERACTIVE"
case ClientSSL:
return "CLIENT_SSL"
case ClientIgnoreSigpipe:
return "CLIENT_IGNORE_SIGPIPE"
case ClientTransactions:
return "CLIENT_TRANSACTIONS"
case ClientReserved:
return "CLIENT_RESERVED"
case ClientSecureConnection:
return "CLIENT_SECURE_CONNECTION"
case ClientMultiStatements:
return "CLIENT_MULTI_STATEMENTS"
case ClientMultiResults:
return "CLIENT_MULTI_RESULTS"
case ClientPsMultiResults:
return "CLIENT_PS_MULTI_RESULTS"
case ClientPluginAuth:
return "CLIENT_PLUGIN_AUTH"
case ClientConnectAttrs:
return "CLIENT_CONNECT_ATTRS"
case ClientPluginAuthLenencClientData:
return "CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA"
case ClientCanHandleExpiredPasswords:
return "CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS"
case ClientSessionTrack:
return "CLIENT_SESSION_TRACK"
case ClientDeprecateEOF:
return "CLIENT_DEPRECATE_EOF"
default:
return "Unknown Capability"
}
}