forked from SAP/go-hdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
messagetype.go
55 lines (51 loc) · 1.8 KB
/
messagetype.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
package protocol
// MessageType represents the message type.
type MessageType int8
// MessageType constants.
const (
mtNil MessageType = 0
MtExecuteDirect MessageType = 2
MtPrepare MessageType = 3
mtAbapStream MessageType = 4
mtXAStart MessageType = 5
mtXAJoin MessageType = 6
MtExecute MessageType = 13
MtWriteLob MessageType = 16
MtReadLob MessageType = 17
mtFindLob MessageType = 18
MtAuthenticate MessageType = 65
MtConnect MessageType = 66
MtCommit MessageType = 67
MtRollback MessageType = 68
MtCloseResultset MessageType = 69
MtDropStatementID MessageType = 70
MtFetchNext MessageType = 71
mtFetchAbsolute MessageType = 72
mtFetchRelative MessageType = 73
mtFetchFirst MessageType = 74
mtFetchLast MessageType = 75
MtDisconnect MessageType = 77
mtExecuteITab MessageType = 78
mtFetchNextITab MessageType = 79
mtInsertNextITab MessageType = 80
mtBatchPrepare MessageType = 81
MtDBConnectInfo MessageType = 82
mtXopenXAStart MessageType = 83
mtXopenXAEnd MessageType = 84
mtXopenXAPrepare MessageType = 85
mtXopenXACommit MessageType = 86
mtXopenXARollback MessageType = 87
mtXopenXARecover MessageType = 88
mtXopenXAForget MessageType = 89
)
// ClientInfoSupported returns true if message does support client info, false otherwise.
func (mt MessageType) ClientInfoSupported() bool {
/*
mtConnect is only supported since 2.00.042
As server version is only available after connect we do not use it
to support especially version 1.00.122 until maintenance
will end in sommer 2021
return mt == mtConnect || mt == mtPrepare || mt == mtExecuteDirect || mt == mtExecute
*/
return mt == MtPrepare || mt == MtExecuteDirect || mt == MtExecute
}