Skip to content

Commit b8ee277

Browse files
authored
TG-235 Fix cursor.warnings field type (#389)
1 parent 697607a commit b8ee277

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [master](https://github.com/arangodb/go-driver/tree/master) (N/A)
44
- Add support for `exclusive` field for transaction options
55
- Fix cursor executionTime statistics getter
6+
- Fix cursor warnings field type
67

78
## [1.3.0](https://github.com/arangodb/go-driver/tree/v1.3.0) (2022-03-17)
89
- Disallow unknown fields feature

cursor_impl.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ type cursorExtra struct {
9292
Stats cursorStats `json:"stats,omitempty"`
9393
Profile cursorProfile `json:"profile,omitempty"`
9494
Plan *cursorPlan `json:"plan,omitempty"`
95-
Warnings []string `json:"warnings,omitempty"`
95+
Warnings []warn `json:"warnings,omitempty"`
96+
}
97+
98+
type warn struct {
99+
Code int `json:"code"`
100+
Message string `json:"message"`
96101
}
97102

98103
func (c cursorExtra) GetStatistics() QueryStatistics {

0 commit comments

Comments
 (0)