Add support for additional array types.

This commit is contained in:
go-jet 2025-10-16 15:09:07 +02:00
parent 45d4ced9b0
commit 4ee047a675
47 changed files with 1994 additions and 4277 deletions

View file

@ -8,6 +8,7 @@
package model
import (
"github.com/lib/pq"
"time"
)
@ -23,6 +24,6 @@ type Film struct {
ReplacementCost float64
Rating *MpaaRating
LastUpdate time.Time
SpecialFeatures *string
SpecialFeatures *pq.StringArray
Fulltext string
}

View file

@ -19,6 +19,14 @@ const (
MpaaRating_Nc17 MpaaRating = "NC-17"
)
var MpaaRatingAllValues = []MpaaRating{
MpaaRating_G,
MpaaRating_Pg,
MpaaRating_Pg13,
MpaaRating_R,
MpaaRating_Nc17,
}
func (e *MpaaRating) Scan(value interface{}) error {
var enumValue string
switch val := value.(type) {