forked from mirror/gorm
tests mariadb with returning support
This commit is contained in:
parent
e93dc3426e
commit
2c56954cb1
2
scan.go
2
scan.go
|
@ -317,4 +317,4 @@ func Scan(rows Rows, db *DB, mode ScanMode) {
|
||||||
if db.RowsAffected == 0 && db.Statement.RaiseErrorOnNotFound && db.Error == nil {
|
if db.RowsAffected == 0 && db.Statement.RaiseErrorOnNotFound && db.Error == nil {
|
||||||
db.AddError(ErrRecordNotFound)
|
db.AddError(ErrRecordNotFound)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ func TestConnPoolWrapper(t *testing.T) {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
db, err := gorm.Open(mysql.New(mysql.Config{Conn: conn}))
|
db, err := gorm.Open(mysql.New(mysql.Config{Conn: conn, DisableWithReturning: true}))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Should open db success, but got %v", err)
|
t.Fatalf("Should open db success, but got %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ require (
|
||||||
github.com/jinzhu/now v1.1.5
|
github.com/jinzhu/now v1.1.5
|
||||||
github.com/lib/pq v1.10.7
|
github.com/lib/pq v1.10.7
|
||||||
golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect
|
golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect
|
||||||
gorm.io/driver/mysql v1.4.0
|
gorm.io/driver/mysql v1.4.1
|
||||||
gorm.io/driver/postgres v1.4.4
|
gorm.io/driver/postgres v1.4.4
|
||||||
gorm.io/driver/sqlite v1.4.1
|
gorm.io/driver/sqlite v1.4.1
|
||||||
gorm.io/driver/sqlserver v1.4.0
|
gorm.io/driver/sqlserver v1.4.0
|
||||||
|
|
Loading…
Reference in New Issue