Difference between revisions of "Pgx"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
+ | https://stackoverflow.com/questions/56718043/how-to-convert-sqlx-query-results-to-an-array-of-structs | ||
``` | ``` | ||
for rows.Next() { | for rows.Next() { |
Revision as of 23:01, 22 March 2022
https://pkg.go.dev/github.com/jackc/pgx#section-readme
for rows.Next() { s := CustomData{} if err := rows.Scan(&s); err != nil { return err } fmt.Println(s) }