mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Update sqlite
This commit is contained in:
@@ -32,7 +32,7 @@ namespace SqlSugar
|
||||
|
||||
private string GetOracleUpdateColums(int i,DbColumnInfo m,bool iswhere)
|
||||
{
|
||||
return string.Format("\"{0}\"={1}", m.DbColumnName.ToUpper(), FormatValue(i,m.DbColumnName,m.Value,iswhere));
|
||||
return string.Format("\"{0}\"={1}", m.DbColumnName.ToUpper(),base.GetDbColumn(m, FormatValue(i,m.DbColumnName,m.Value,iswhere)));
|
||||
}
|
||||
|
||||
public object FormatValue(int i,string name,object value,bool iswhere)
|
||||
|
@@ -23,6 +23,47 @@ namespace OrmTest
|
||||
}).ExecuteCommand();
|
||||
|
||||
db.Insertable(new ORDER1() { Name = "a" }).ExecuteCommand();
|
||||
|
||||
db.Updateable(new Order1()
|
||||
{
|
||||
CustomId = 1,
|
||||
CreateTime = DateTime.Now,
|
||||
Id = 1,
|
||||
Price = 1,
|
||||
Name = "a"
|
||||
}).ExecuteCommand();
|
||||
|
||||
db.Updateable(new List<Order1>(){ new Order1()
|
||||
{
|
||||
CustomId = 1,
|
||||
CreateTime = DateTime.Now,
|
||||
Id = 1,
|
||||
Price = 1,
|
||||
Name = "a"
|
||||
},
|
||||
new Order1()
|
||||
{
|
||||
CustomId = 1,
|
||||
CreateTime = DateTime.Now,
|
||||
Id = 1,
|
||||
Price = 1,
|
||||
Name = "a"
|
||||
} }).ExecuteCommand();
|
||||
|
||||
|
||||
db.Updateable<Order1>().SetColumns(it => new Order1()
|
||||
{
|
||||
CustomId = 1,
|
||||
Price = 1,
|
||||
Name = "a"
|
||||
}, true).Where(it => it.Id == 1).ExecuteCommand();
|
||||
|
||||
db.Updateable<ORDER1>().SetColumns(it => new ORDER1()
|
||||
{
|
||||
CustomId = 1,
|
||||
Price = 1,
|
||||
Name = "a"
|
||||
}, true).Where(it => it.Id == 1).ExecuteCommand();
|
||||
}
|
||||
|
||||
public class Order1
|
||||
@@ -34,7 +75,7 @@ namespace OrmTest
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
[SugarColumn(InsertServerTime =true)]
|
||||
[SugarColumn(InsertServerTime =true,UpdateServerTime =true)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public int CustomId { get; set; }
|
||||
@@ -49,7 +90,7 @@ namespace OrmTest
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
[SugarColumn(InsertSql = "'2020-1-1'")]
|
||||
[SugarColumn(InsertSql = "'2020-1-1'", UpdateSql = "'2020-1-1'")]
|
||||
public DateTime CreateTime { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public int CustomId { get; set; }
|
||||
|
Reference in New Issue
Block a user