From aa362c77daeff24701826aba11df57e95cd76fe8 Mon Sep 17 00:00:00 2001 From: Hein Date: Fri, 27 Mar 2026 15:07:10 +0200 Subject: [PATCH] fix(cursor): trim parentheses from sort column names --- pkg/resolvemcp/cursor.go | 2 +- pkg/resolvespec/cursor.go | 2 +- pkg/restheadspec/cursor.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/resolvemcp/cursor.go b/pkg/resolvemcp/cursor.go index 25d038f..fd04507 100644 --- a/pkg/resolvemcp/cursor.go +++ b/pkg/resolvemcp/cursor.go @@ -46,7 +46,7 @@ func getCursorFilter( reverse := direction < 0 for _, s := range sortItems { - col := strings.TrimSpace(s.Column) + col := strings.Trim(strings.TrimSpace(s.Column), "()") if col == "" { continue } diff --git a/pkg/resolvespec/cursor.go b/pkg/resolvespec/cursor.go index 879e4e1..56b4a23 100644 --- a/pkg/resolvespec/cursor.go +++ b/pkg/resolvespec/cursor.go @@ -67,7 +67,7 @@ func GetCursorFilter( // 4. Process each sort column // --------------------------------------------------------------------- // for _, s := range sortItems { - col := strings.TrimSpace(s.Column) + col := strings.Trim(strings.TrimSpace(s.Column), "()") if col == "" { continue } diff --git a/pkg/restheadspec/cursor.go b/pkg/restheadspec/cursor.go index ab776ed..0bebe5e 100644 --- a/pkg/restheadspec/cursor.go +++ b/pkg/restheadspec/cursor.go @@ -64,7 +64,7 @@ func (opts *ExtendedRequestOptions) GetCursorFilter( // 4. Process each sort column // --------------------------------------------------------------------- // for _, s := range sortItems { - col := strings.TrimSpace(s.Column) + col := strings.Trim(strings.TrimSpace(s.Column), "()") if col == "" { continue }