diff --git a/satellite/satellitedb/projectmembers.go b/satellite/satellitedb/projectmembers.go index b75d2c8e80a4..8d8ede680326 100644 --- a/satellite/satellitedb/projectmembers.go +++ b/satellite/satellitedb/projectmembers.go @@ -241,11 +241,11 @@ func (pm *projectMembers) GetPagedWithInvitationsByProjectID(ctx context.Context for rows.Next() { var ( - memberID NullUUID + memberID uuid.NullUUID projectID uuid.UUID createdAt time.Time email string - inviterID NullUUID + inviterID uuid.NullUUID ) err = rows.Scan( diff --git a/satellite/satellitedb/util.go b/satellite/satellitedb/util.go index 54d305dccb08..49d664e54209 100644 --- a/satellite/satellitedb/util.go +++ b/satellite/satellitedb/util.go @@ -6,7 +6,6 @@ package satellitedb import ( "github.com/zeebo/errs" - "storj.io/common/uuid" "storj.io/private/tagsql" ) @@ -61,26 +60,3 @@ func convertSliceWithErrors[In, Out any](xs []In, fn func(In) (Out, error)) ([]O } return rs, errs } - -// NullUUID represents a nullable uuid.UUID that can be used as an SQL scan destination. -type NullUUID struct { - UUID uuid.UUID - Valid bool -} - -// Scan implements the sql.Scanner interface. -// It scans a value from the database into the NullUUID. -func (nu *NullUUID) Scan(value interface{}) error { - if value == nil { - nu.UUID = uuid.UUID{} - nu.Valid = false - return nil - } - valueBytes, ok := value.([]byte) - if !ok { - return errs.New("invalid UUID type") - } - copy(nu.UUID[:], valueBytes) - nu.Valid = true - return nil -}