Source File
model_map_slice.go
Belonging Package
github.com/go-pg/pg/v10/orm
package orm
type mapSliceModel struct {
mapModel
slice *[]map[string]interface{}
}
var _ Model = (*mapSliceModel)(nil)
func ( *[]map[string]interface{}) *mapSliceModel {
return &mapSliceModel{
slice: ,
}
}
func ( *mapSliceModel) () error {
:= *.slice
if len() > 0 {
*.slice = [:0]
}
return nil
}
func ( *mapSliceModel) () ColumnScanner {
:= *.slice
if len() == cap() {
.mapModel.m = make(map[string]interface{})
*.slice = append(, .mapModel.m) //nolint:gocritic
return
}
= [:len()+1]
:= [len()-1]
if != nil {
.mapModel.m =
} else {
= make(map[string]interface{})
[len()-1] =
.mapModel.m =
}
*.slice =
return
}
func (mapSliceModel) () {} //nolint:unused
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)