mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update oracle
This commit is contained in:
parent
bc7e823e93
commit
0835bbbe97
@ -53,9 +53,16 @@ namespace OrmTest
|
|||||||
//If there is no primary key
|
//If there is no primary key
|
||||||
var result5 = db.Updateable(updateObj).WhereColumns(it => new { it.Id }).ExecuteCommand();//update single by id
|
var result5 = db.Updateable(updateObj).WhereColumns(it => new { it.Id }).ExecuteCommand();//update single by id
|
||||||
var result6 = db.Updateable(updateObjs).WhereColumns(it => new { it.Id }).ExecuteCommand();//update List<Class> by id
|
var result6 = db.Updateable(updateObjs).WhereColumns(it => new { it.Id }).ExecuteCommand();//update List<Class> by id
|
||||||
|
|
||||||
|
var result67 =
|
||||||
|
db.Updateable(updateObjs)
|
||||||
|
.PublicSetColumns(it => it.Price, it => it.Price + 1)
|
||||||
|
.ExecuteCommand();
|
||||||
|
|
||||||
|
var result68 =
|
||||||
|
db.Updateable(updateObjs.First())
|
||||||
|
.PublicSetColumns(it => it.Price, it => it.Price + 1)
|
||||||
|
.ExecuteCommand();
|
||||||
|
|
||||||
/*** 2.by expression ***/
|
/*** 2.by expression ***/
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
public class OracleUpdateBuilder : UpdateBuilder
|
public class OracleUpdateBuilder : UpdateBuilder
|
||||||
{
|
{
|
||||||
|
public override string ReSetValueBySqlExpListType { get; set; } = "oracle";
|
||||||
protected override string TomultipleSqlString(List<IGrouping<int, DbColumnInfo>> groupList)
|
protected override string TomultipleSqlString(List<IGrouping<int, DbColumnInfo>> groupList)
|
||||||
{
|
{
|
||||||
if (groupList.Count == 0)
|
if (groupList.Count == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user