Skip to content

Commit

Permalink
Add Scan to pgtype.FlatArray
Browse files Browse the repository at this point in the history
  • Loading branch information
regeda committed Oct 31, 2023
1 parent cf6ef75 commit 127b3e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pgtype/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,8 @@ func (a FlatArray[T]) ScanIndex(i int) any {
func (a FlatArray[T]) ScanIndexType() any {
return new(T)
}

func (a *FlatArray[T]) Scan(src any) error {
scanner := &sqlScannerWrapper{m: defaultMap, v: (*[]T)(a)}
return scanner.Scan(src)
}

0 comments on commit 127b3e1

Please sign in to comment.