Difference between revisions of "Pgx"
Jump to navigation
Jump to search
(Created page with "https://pkg.go.dev/github.com/jackc/pgx#section-readme") |
|||
Line 1: | Line 1: | ||
https://pkg.go.dev/github.com/jackc/pgx#section-readme | 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) | ||
+ | } | ||
+ | ``` |
Revision as of 22:59, 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) }