Open adminpass opened 3 days ago
type Electric struct { ID int64 `gorm:"id" greptime:"-"` DataTime time.Time `gorm:"data_time;primaryKey" greptime:"timestamp;column:data_time;type:timestamp;precision:second"` DeviceNo string `gorm:"device_no;primaryKey" greptime:"tag;column:device_no;type:string"` Value float32 `gorm:"value" greptime:"field;column:value;type:float32"` }
use gorm to query data, ignore ID when writing to greptimedb
Do you want to ignore the fields marked with - when writing data? @adminpass
-
@daviderli614 yes, use greptime:"-"
use gorm to query data, ignore ID when writing to greptimedb