From 2fd1e5d6f2179a4fa3417615d32f5f88bf58d70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Fri, 6 Dec 2024 14:39:21 +0000 Subject: [PATCH] lints --- flow/model/qrecord_copy_from_source.go | 2 +- flow/model/qvalue/qvalue.go | 2 +- flow/model/record_items.go | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/flow/model/qrecord_copy_from_source.go b/flow/model/qrecord_copy_from_source.go index 057d4b1ffc..e98adea90f 100644 --- a/flow/model/qrecord_copy_from_source.go +++ b/flow/model/qrecord_copy_from_source.go @@ -90,7 +90,7 @@ func (src *QRecordCopyFromSource) Values() ([]interface{}, error) { case qvalue.QValueTimestampTZ: values[i] = pgtype.Timestamptz{Time: v.Val, Valid: true} case qvalue.QValueUUID: - values[i] = uuid.UUID(v.Val) + values[i] = v.Val case qvalue.QValueArrayUUID: a, err := constructArray[uuid.UUID](qValue, "ArrayUUID") if err != nil { diff --git a/flow/model/qvalue/qvalue.go b/flow/model/qvalue/qvalue.go index de703a112a..9e81c080d6 100644 --- a/flow/model/qvalue/qvalue.go +++ b/flow/model/qvalue/qvalue.go @@ -355,7 +355,7 @@ func (v QValueUUID) Value() any { } func (v QValueUUID) LValue(ls *lua.LState) lua.LValue { - return shared.LuaUuid.New(ls, uuid.UUID(v.Val)) + return shared.LuaUuid.New(ls, v.Val) } type QValueArrayUUID struct { diff --git a/flow/model/record_items.go b/flow/model/record_items.go index 7c242974b3..13b6dfef5a 100644 --- a/flow/model/record_items.go +++ b/flow/model/record_items.go @@ -5,8 +5,6 @@ import ( "fmt" "math" - "github.com/google/uuid" - "github.com/PeerDB-io/peer-flow/datatypes" "github.com/PeerDB-io/peer-flow/model/qvalue" ) @@ -89,7 +87,7 @@ func (r RecordItems) toMap(opts ToJSONOptions) (map[string]interface{}, error) { switch v := qv.(type) { case qvalue.QValueUUID: - jsonStruct[col] = uuid.UUID(v.Val) + jsonStruct[col] = v.Val case qvalue.QValueQChar: jsonStruct[col] = string(v.Val) case qvalue.QValueString: