I want to scan in an array of strings using the pgx library without using pq ideally. Is there a way of doing this:
sourceKeys := make([]string, 0, 1)
err := rows.Scan(
pq.Array(&sourceKeys),
)
without using the pq library?
I want to scan in an array of strings using the pgx library without using pq ideally. Is there a way of doing this:
sourceKeys := make([]string, 0, 1)
err := rows.Scan(
pq.Array(&sourceKeys),
)
without using the pq library?
© 2022 - 2024 — McMap. All rights reserved.
sql.Scanner
yourself. The implementation will have to be able to correctly parse a raw postgres text array. Or you can use thejackc/pgtype
package which is intended to be used withpgx
(same author and mentioned in pgx's readme). – Aircraft