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

18 lines
299 B
Go
Raw Normal View History

// +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
})
}