Skip to content

Commit 7b40032

Browse files
authored
sql: assert UUID satisfies the driver.Valuer and sql.Scanner interfaces (#113)
1 parent f1cfba7 commit 7b40032

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sql.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@
2222
package uuid
2323

2424
import (
25+
"database/sql"
2526
"database/sql/driver"
2627
"fmt"
2728
)
2829

30+
var _ driver.Valuer = UUID{}
31+
var _ sql.Scanner = (*UUID)(nil)
32+
2933
// Value implements the driver.Valuer interface.
3034
func (u UUID) Value() (driver.Value, error) {
3135
return u.String(), nil

0 commit comments

Comments
 (0)