diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c4abec8..3ce59e0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [master](https://github.com/arangodb/go-driver/tree/master) (N/A) - Add support for `exclusive` field for transaction options - Fix cursor executionTime statistics getter +- Fix cursor warnings field type ## [1.3.0](https://github.com/arangodb/go-driver/tree/v1.3.0) (2022-03-17) - Disallow unknown fields feature diff --git a/cursor_impl.go b/cursor_impl.go index 45963d35..91026969 100644 --- a/cursor_impl.go +++ b/cursor_impl.go @@ -92,7 +92,12 @@ type cursorExtra struct { Stats cursorStats `json:"stats,omitempty"` Profile cursorProfile `json:"profile,omitempty"` Plan *cursorPlan `json:"plan,omitempty"` - Warnings []string `json:"warnings,omitempty"` + Warnings []warn `json:"warnings,omitempty"` +} + +type warn struct { + Code int `json:"code"` + Message string `json:"message"` } func (c cursorExtra) GetStatistics() QueryStatistics {