猿问

如何将 pgtype.Int4Array转换为 []int64 Golang 类型?

我使用 Go 和 Postgres (带有pgx 驱动程序)

在我的 Postgres 表中,我有一个包含整数数组的字段。我创建了一个变量来存储扫描后的整数数组。

var ids pgtype.Int4Array

如何转换ids[]int64


达令说
浏览 103回答 1
1回答

慕娘9325324

使用ids.AssignTo(&sliceOfInt64)
随时随地看视频慕课网APP

相关分类

Go
我要回答