Skip to content

Commit d2227f0

Browse files
authored
Merge pull request #5 from rebelice/fix/uuid-display
fix(data): display UUID values in standard format
2 parents b19700d + 6178b11 commit d2227f0

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

internal/db/metadata/data.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ func convertValueToString(val interface{}) string {
9898
return fmt.Sprintf("%v", val)
9999
}
100100
return string(jsonBytes)
101+
case [16]byte:
102+
// UUID from PostgreSQL
103+
return fmt.Sprintf("%x-%x-%x-%x-%x", v[:4], v[4:6], v[6:8], v[8:10], v[10:])
101104
case []byte:
102105
// Might be raw JSON bytes
103106
return string(v)

internal/db/query/executor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ func convertValueToString(val interface{}) string {
7979
return fmt.Sprintf("%v", val)
8080
}
8181
return string(jsonBytes)
82+
case [16]byte:
83+
// UUID from PostgreSQL
84+
return fmt.Sprintf("%x-%x-%x-%x-%x", v[:4], v[4:6], v[6:8], v[8:10], v[10:])
8285
case []byte:
8386
// Might be raw JSON bytes
8487
return string(v)

internal/ui/components/table_view_pin_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func TestTableView_IsPinned(t *testing.T) {
128128
tv.SetData(columns, rows, 3)
129129

130130
tv.SelectedRow = 1
131-
tv.TogglePin()
131+
_ = tv.TogglePin()
132132

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

154154
// Pin multiple rows
155155
tv.SelectedRow = 0
156-
tv.TogglePin()
156+
_ = tv.TogglePin()
157157
tv.SelectedRow = 1
158-
tv.TogglePin()
158+
_ = tv.TogglePin()
159159

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

0 commit comments

Comments
 (0)