Skip to content

Commit

Permalink
[*] use pgx.RowToStructByName instead of local one, closes #514
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Nov 21, 2022
1 parent a02b7da commit 2d4a65d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 159 deletions.
2 changes: 1 addition & 1 deletion internal/pgengine/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ FROM timetable.chain WHERE (client_name = $1 OR client_name IS NULL) AND chain_i
if err != nil {
return err
}
*dest, err = pgx.CollectOneRow(rows, RowToStructByName[Chain])
*dest, err = pgx.CollectOneRow(rows, pgx.RowToStructByName[Chain])
return err
}
109 changes: 0 additions & 109 deletions internal/pgengine/rows.go

This file was deleted.

48 changes: 0 additions & 48 deletions internal/pgengine/rows_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion internal/pgengine/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ FROM timetable.task WHERE chain_id = $1 ORDER BY task_order ASC`
if err != nil {
return err
}
*chainTasks, err = pgx.CollectRows(rows, RowToStructByName[ChainTask])
*chainTasks, err = pgx.CollectRows(rows, pgx.RowToStructByName[ChainTask])
return err
}

Expand Down

0 comments on commit 2d4a65d

Please sign in to comment.