镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

How to query multi-dimensional array of float64 ? #960

Open

Description

@b3j0f

According to this query:

db.Query("SELECT data FROM chunk", array)

where data is type double precision[][]

I tried with those types without success:

var (
    data [][]sql.NullFloat64
    array = pq.Array(pq.GenericArray{A: &data})
)

error: sql: Scan error on column index 1, name "data": unsupported Scan, storing driver.Value type []uint8 into type *interface { Scan(interface {}) error; Value() (driver.Value, error) }

var (
    data [][]sql.NullFloat64
    array = pq.GenericArray{A: &data}
)

error: sql: Scan error on column index 1, name "data": pq: scanning from multidimensional ARRAY[54614][12] is not implemented

...

Do you have any advice ?

Activity

  1. WilliamSoler commented on Apr 3, 2024

    @WilliamSoler

    As far I am aware currently is not possible. Which to me seems quite a standard use case to be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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