1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-16 10:32:17 +00:00

update support bit operation

This commit is contained in:
harry890829
2020-05-18 19:16:50 +08:00
parent 3e30f37172
commit 71cb1379b4
5 changed files with 52 additions and 3 deletions

View File

@@ -770,6 +770,16 @@ func (d *dbBase) UpdateBatch(q dbQuerier, qs *querySet, mi *modelInfo, cond *Con
cols = append(cols, col+" = "+col+" * ?")
case ColExcept:
cols = append(cols, col+" = "+col+" / ?")
case ColBitAnd:
cols = append(cols, col+" = "+col+" & ?")
case ColBitRShift:
cols = append(cols, col+" = "+col+" >> ?")
case ColBitLShift:
cols = append(cols, col+" = "+col+" << ?")
case ColBitXOR:
cols = append(cols, col+" = "+col+" ^ ?")
case ColBitOr:
cols = append(cols, col+" = "+col+" | ?")
}
values[i] = c.value
} else {