go-gorm / gorm

The fantastic ORM library for Golang, aims to be developer friendly
https://gorm.io
MIT License
36.86k stars 3.93k forks source link

Which type can be used to represent Array type in ClickHouse? #6168

Open houbaron opened 1 year ago

houbaron commented 1 year ago

Your Question

I use string array to represent array type, like this.

type Row struct {
    FieldA []string
}

But I got unsupported data type: &[]. While it can work.

The document you expected this should be explained

https://gorm.io/docs/models.html

Expected answer

A type can represent ClickHouse Array type.

houbaron commented 1 year ago

https://github.com/go-gorm/gorm/blob/master/schema/schema.go#L292 https://github.com/go-gorm/gorm/blob/master/schema/schema.go#L330