Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/db/metadata/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ func convertValueToString(val interface{}) string {
return fmt.Sprintf("%v", val)
}
return string(jsonBytes)
case [16]byte:
// UUID from PostgreSQL
return fmt.Sprintf("%x-%x-%x-%x-%x", v[:4], v[4:6], v[6:8], v[8:10], v[10:])
case []byte:
// Might be raw JSON bytes
return string(v)
Expand Down
3 changes: 3 additions & 0 deletions internal/db/query/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func convertValueToString(val interface{}) string {
return fmt.Sprintf("%v", val)
}
return string(jsonBytes)
case [16]byte:
// UUID from PostgreSQL
return fmt.Sprintf("%x-%x-%x-%x-%x", v[:4], v[4:6], v[6:8], v[8:10], v[10:])
case []byte:
// Might be raw JSON bytes
return string(v)
Expand Down
6 changes: 3 additions & 3 deletions internal/ui/components/table_view_pin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func TestTableView_IsPinned(t *testing.T) {
tv.SetData(columns, rows, 3)

tv.SelectedRow = 1
tv.TogglePin()
_ = tv.TogglePin()

if !tv.IsPinned(1) {
t.Fatal("row 1 should be pinned")
Expand All @@ -153,9 +153,9 @@ func TestTableView_ClearPins(t *testing.T) {

// Pin multiple rows
tv.SelectedRow = 0
tv.TogglePin()
_ = tv.TogglePin()
tv.SelectedRow = 1
tv.TogglePin()
_ = tv.TogglePin()

if tv.GetPinnedCount() != 2 {
t.Fatalf("expected 2 pinned rows, got %d", tv.GetPinnedCount())
Expand Down