[Fix-Issue-3991] Add warn for SQLite Read is invoked isForUpdate=true

This commit is contained in:
Yang, Gao 2020-06-01 23:12:12 +08:00
parent 8055357576
commit 677d010d86
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,9 @@ var _ dbBaser = new(dbBaseSqlite)
// override base db read for update behavior as SQlite does not support syntax
func (d *dbBaseSqlite) Read(q dbQuerier, mi *modelInfo, ind reflect.Value, tz *time.Location, cols []string, isForUpdate bool) error {
if isForUpdate {
DebugLog.Println("[WARN] SQLite does not support SELECT FOR UPDATE query, isForUpdate param is ignored and always as false to do the work")
}
return d.dbBase.Read(q, mi, ind, tz, cols, false)
}