mirror of
https://github.com/astaxie/beego.git
synced 2024-11-21 22:40:54 +00:00
add const ErrLastInsertIdUnavailable
This commit is contained in:
parent
7ce0fde171
commit
139c393f08
@ -488,7 +488,7 @@ func (d *dbBase) InsertValue(q dbQuerier, mi *modelInfo, isMulti bool, names []s
|
||||
|
||||
lastInsertId, err := res.LastInsertId()
|
||||
if err != nil {
|
||||
DebugLog.Println("[WARN] return LastInsertId error:", err)
|
||||
DebugLog.Println(ErrLastInsertIdUnavailable, ':', err)
|
||||
}
|
||||
return lastInsertId, nil
|
||||
}
|
||||
@ -594,7 +594,7 @@ func (d *dbBase) InsertOrUpdate(q dbQuerier, mi *modelInfo, ind reflect.Value, a
|
||||
|
||||
lastInsertId, err := res.LastInsertId()
|
||||
if err != nil {
|
||||
DebugLog.Println("[WARN] return LastInsertId error:", err)
|
||||
DebugLog.Println(ErrLastInsertIdUnavailable, ':', err)
|
||||
}
|
||||
return lastInsertId, nil
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ func (d *dbBaseMysql) InsertOrUpdate(q dbQuerier, mi *modelInfo, ind reflect.Val
|
||||
|
||||
lastInsertId, err := res.LastInsertId()
|
||||
if err != nil {
|
||||
DebugLog.Println("[WARN] return LastInsertId error:", err)
|
||||
DebugLog.Println(ErrLastInsertIdUnavailable, ':', err)
|
||||
}
|
||||
return lastInsertId, nil
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ func (d *dbBaseOracle) InsertValue(q dbQuerier, mi *modelInfo, isMulti bool, nam
|
||||
|
||||
lastInsertId, err := res.LastInsertId()
|
||||
if err != nil {
|
||||
DebugLog.Println("[WARN] return LastInsertId error:", err)
|
||||
DebugLog.Println(ErrLastInsertIdUnavailable, ':', err)
|
||||
}
|
||||
return lastInsertId, nil
|
||||
}
|
||||
|
@ -85,6 +85,8 @@ var (
|
||||
ErrStmtClosed = errors.New("<QuerySeter> stmt already closed")
|
||||
ErrArgs = errors.New("<Ormer> args error may be empty")
|
||||
ErrNotImplement = errors.New("have not implement")
|
||||
|
||||
ErrLastInsertIdUnavailable = errors.New("<Ormer> last insert id is unavailable")
|
||||
)
|
||||
|
||||
// Params stores the Params
|
||||
|
Loading…
Reference in New Issue
Block a user