Provisioning: Allows specifying uid for datasource and use that in derived fields (#23585)
* Add uid to datasource * Fix uid passing when provisioning * Better error handling and Uid column type change * Fix test and strict null error counts * Add backend tests * Add tests * Fix strict null checks * Update test * Improve tests * Update pkg/services/sqlstore/datasource.go Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com> * Variable rename Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
co-authored by
Arve Knudsen
parent
d5f8d976f0
commit
e5dd7efdee
@@ -148,6 +148,13 @@ func (db *Mysql) IsUniqueConstraintViolation(err error) bool {
|
||||
return db.isThisError(err, mysqlerr.ER_DUP_ENTRY)
|
||||
}
|
||||
|
||||
func (db *Mysql) ErrorMessage(err error) string {
|
||||
if driverErr, ok := err.(*mysql.MySQLError); ok {
|
||||
return driverErr.Message
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (db *Mysql) IsDeadlock(err error) bool {
|
||||
return db.isThisError(err, mysqlerr.ER_LOCK_DEADLOCK)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user