Skip to content

Rewrite the array.go to support generic array type? #1103

@liur180855

Description

@liur180855

Hello,

AFAIK this is current use case of Generic Array

//  var x []sql.NullInt64
//  db.QueryRow(`SELECT ARRAY[235, 401]`).Scan(pq.Array(&x))

if we can rewrite or add another version of generic array to support the following use case in sqlx

type Foobar struct {
}

type Foo struct {
	Bar pq.GenericArrayV2[bool]
	Baz pq.GenericArrayV2[Foobar]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions