enable for update test for postgres
This commit is contained in:
parent
0f085408af
commit
8e2fda467f
|
@ -233,8 +233,8 @@ func (statement *Statement) writeForUpdate(w *builder.BytesWriter) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
if statement.dialect.URI().DBType != schemas.MYSQL {
|
||||
return errors.New("only support mysql for update")
|
||||
if statement.dialect.URI().DBType != schemas.MYSQL && statement.dialect.URI().DBType != schemas.POSTGRES {
|
||||
return errors.New("only support mysql and postgres for update")
|
||||
}
|
||||
_, err := fmt.Fprint(w, " FOR UPDATE")
|
||||
return err
|
||||
|
|
|
@ -88,7 +88,6 @@ func createEngine(dbType, connStr string) error {
|
|||
}
|
||||
}
|
||||
db.Close()
|
||||
*ignoreSelectUpdate = true
|
||||
case schemas.MYSQL:
|
||||
db, err := sql.Open(dbType, strings.ReplaceAll(connStr, "xorm_test", "mysql"))
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue