This repository has been archived on 2022-08-17. You can view files and clone it, but cannot push or open issues or pull requests.
dex/db/conn_sqlite3.go
2016-06-28 16:09:20 -07:00

17 lines
298 B
Go

// +build cgo
package db
// Register the sqlite3 driver.
import "github.com/mattn/go-sqlite3"
func init() {
registerAlreadyExistsChecker(func(err error) bool {
sqlErr, ok := err.(sqlite3.Error)
if !ok {
return false
}
return sqlErr.ExtendedCode == sqlite3.ErrConstraintUnique
})
}