From 6e524b7e5e538b67f6755dc97835376bea72f6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=97=AD=E7=BA=A2=20=28karminski-=E7=89=99?= =?UTF-8?q?=E5=8C=BB=29?= Date: Thu, 1 Feb 2024 18:03:41 +0800 Subject: [PATCH] ADD rows dump for postgres action. --- src/actionruntime/postgresql/service.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/actionruntime/postgresql/service.go b/src/actionruntime/postgresql/service.go index 75cbf4af..4aa98105 100644 --- a/src/actionruntime/postgresql/service.go +++ b/src/actionruntime/postgresql/service.go @@ -16,6 +16,7 @@ package postgresql import ( "context" + "encoding/json" "errors" "fmt" @@ -142,6 +143,8 @@ func (p *Connector) Run(resourceOptions map[string]interface{}, actionOptions ma // fetch data if isSelectQuery && p.Action.IsSafeMode() { rows, err := db.Query(context.Background(), escapedSQL, sqlArgs...) + rowsInJSONByte, _ := json.Marshal(rows) + fmt.Printf("[DUMP] rows: %s\n", string(rowsInJSONByte)) if err != nil { return queryResult, err }