Skip to content

Commit

Permalink
Merge pull request #101 from go-faster/feat/col-uuid-implement-column-of
Browse files Browse the repository at this point in the history
feat(proto): implement ColumnOf[uuid.UUID]
  • Loading branch information
ernado authored May 16, 2022
2 parents e166557 + fe0ae0d commit 7280647
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions proto/col_uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ type ColUUID []uuid.UUID

// Compile-time assertions for ColUUID.
var (
_ ColInput = ColUUID{}
_ ColResult = (*ColUUID)(nil)
_ Column = (*ColUUID)(nil)
_ ColInput = ColUUID{}
_ ColResult = (*ColUUID)(nil)
_ Column = (*ColUUID)(nil)
_ ColumnOf[uuid.UUID] = (*ColUUID)(nil)
)

func (c ColUUID) Type() ColumnType { return ColumnTypeUUID }
func (c ColUUID) Rows() int { return len(c) }
func (c *ColUUID) Reset() { *c = (*c)[:0] }
func (c ColUUID) Type() ColumnType { return ColumnTypeUUID }
func (c ColUUID) Rows() int { return len(c) }
func (c ColUUID) Row(i int) uuid.UUID { return c[i] }
func (c *ColUUID) Reset() { *c = (*c)[:0] }
func (c *ColUUID) Append(v uuid.UUID) { *c = append(*c, v) }
func (c *ColUUID) AppendArr(v []uuid.UUID) { *c = append(*c, v...) }

0 comments on commit 7280647

Please sign in to comment.