From 4c67e8b586a8af03066912196672cc5a700b081a Mon Sep 17 00:00:00 2001 From: Drahflow Date: Mon, 21 Feb 2022 15:15:05 +0100 Subject: [PATCH] Force metadata retrieval for CAS queries ... otherwise the [applied] column is not noticed and setting of Iter.applied is skipped. --- queryx.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/queryx.go b/queryx.go index 175132b..67043cc 100644 --- a/queryx.go +++ b/queryx.go @@ -237,6 +237,7 @@ func (q *Queryx) ExecRelease() error { // ExecCAS executes the Lightweight Transaction query, returns whether query was applied. // See: https://docs.scylladb.com/using-scylla/lwt/ for more details. func (q *Queryx) ExecCAS() (applied bool, err error) { + q.NoSkipMetadata() iter := q.Iter().StructOnly() if err := iter.Get(&struct{}{}); err != nil { return false, err @@ -287,6 +288,7 @@ func (q *Queryx) GetCAS(dest interface{}) (applied bool, err error) { return false, q.err } + q.NoSkipMetadata() iter := q.Iter() if err := iter.Get(dest); err != nil { return false, err