mirror of https://github.com/dexidp/dex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
299 B
18 lines
299 B
|
10 years ago
|
// +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
|
||
|
|
})
|
||
|
|
}
|