Skip to content

Commit

Permalink
ADD rows dump for postgres action.
Browse files Browse the repository at this point in the history
  • Loading branch information
karminski committed Feb 1, 2024
1 parent 7a89668 commit 6e524b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/actionruntime/postgresql/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package postgresql

import (
"context"
"encoding/json"
"errors"
"fmt"

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 6e524b7

Please sign in to comment.