diff --git a/Src/Asp.Net/SqliteTest/UnitTest/UCodeFirst.cs b/Src/Asp.Net/SqliteTest/UnitTest/UCodeFirst.cs index 3c853a7d5..675a8e69e 100644 --- a/Src/Asp.Net/SqliteTest/UnitTest/UCodeFirst.cs +++ b/Src/Asp.Net/SqliteTest/UnitTest/UCodeFirst.cs @@ -16,9 +16,7 @@ namespace OrmTest } public class UnitCodeTest1 { - [SqlSugar.SugarColumn(IndexGroupNameList = new string[] { "group1" })] public int Id { get; set; } - [SqlSugar.SugarColumn(DefaultValue="getdate()", IndexGroupNameList =new string[] {"group1" } )] public DateTime? CreateDate { get; set; } } } diff --git a/Src/Asp.Net/SqliteTest/UnitTest/UJson.cs b/Src/Asp.Net/SqliteTest/UnitTest/UJson.cs index 717607f1d..354187108 100644 --- a/Src/Asp.Net/SqliteTest/UnitTest/UJson.cs +++ b/Src/Asp.Net/SqliteTest/UnitTest/UJson.cs @@ -28,7 +28,7 @@ namespace OrmTest { [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } - [SqlSugar.SugarColumn(ColumnDataType = "varchar(max)", IsJson = true)] + [SqlSugar.SugarColumn(ColumnDataType = "varchar(4000)", IsJson = true)] public Order Order { get; set; } } } diff --git a/Src/Asp.Net/SqliteTest/UnitTest/UQueryable.cs b/Src/Asp.Net/SqliteTest/UnitTest/UQueryable.cs index 2731ed6d9..bac46dc74 100644 --- a/Src/Asp.Net/SqliteTest/UnitTest/UQueryable.cs +++ b/Src/Asp.Net/SqliteTest/UnitTest/UQueryable.cs @@ -39,18 +39,18 @@ namespace OrmTest DcNull = it.Dc, Dc = it.Int }).ToSql().Key; - UValidate.Check(sql, "SELECT [Dc] AS [DcNull] , [Int] AS [Dc] FROM [UnitSelectTest]", "Queryable"); + UValidate.Check(sql, "SELECT `Dc` AS `DcNull` , `Int` AS `Dc` FROM `UnitSelectTest`", "Queryable"); sql = Db.Updateable(new UnitSelectTest2()).ToSql().Key; - UValidate.Check(sql, @"UPDATE [UnitSelectTest2] SET - [Dc]=@Dc,[IntNull]=@IntNull WHERE [Int]=@Int", "Queryable"); + UValidate.Check(sql, @"UPDATE `UnitSelectTest2` SET + `Dc`=@Dc,`IntNull`=@IntNull WHERE `Int`=@Int", "Queryable"); sql = Db.Queryable().IgnoreColumns(it => it.CreateTime).ToSql().Key; - UValidate.Check(sql, "SELECT [Id],[Name],[Price],[CustomId] FROM `order` ", "Queryable"); + UValidate.Check(sql, "SELECT `Id`,`Name`,`Price`,`CustomId` FROM `Order` ", "Queryable"); sql = Db.Queryable().IgnoreColumns(it => new { it.Id, it.Name }).ToSql().Key; - UValidate.Check(sql, "SELECT [Price],[CreateTime],[CustomId] FROM `order` ", "Queryable"); + UValidate.Check(sql, "SELECT `Price`,`CreateTime`,`CustomId` FROM `Order` ", "Queryable"); sql = Db.Queryable().IgnoreColumns("id").ToSql().Key; - UValidate.Check(sql, "SELECT [Name],[Price],[CreateTime],[CustomId] FROM `order` ", "Queryable"); + UValidate.Check(sql, "SELECT `Name`,`Price`,`CreateTime`,`CustomId` FROM `Order` ", "Queryable"); var cts = IEnumerbleContains.Data(); var list2=Db.Queryable() diff --git a/Src/Asp.Net/SqliteTest/UnitTest/Updateable.cs b/Src/Asp.Net/SqliteTest/UnitTest/Updateable.cs index 2397d6032..0a99f6da9 100644 --- a/Src/Asp.Net/SqliteTest/UnitTest/Updateable.cs +++ b/Src/Asp.Net/SqliteTest/UnitTest/Updateable.cs @@ -43,16 +43,16 @@ namespace OrmTest { IsRemind = saveDiary.IsRemind, }).Where(it => it.ID == saveDiary.ID).ToSql(); - UValidate.Check(sql.Key, @"UPDATE [Diary] SET - [IsRemind] = @Const0 WHERE ( [ID] = @ID1 )", "Updateable"); + UValidate.Check(sql.Key, @"UPDATE `Diary` SET + `IsRemind` = @Const0 WHERE ( `ID` = @ID1 )", "Updateable"); sql = Db.Updateable().SetColumns(it => new UnitDiary() { TypeID = saveDiary.TypeID, }).Where(it => it.ID == saveDiary.ID).ToSql(); - UValidate.Check(sql.Key, @"UPDATE [Diary] SET - [TypeID] = @Const0 WHERE ( [ID] = @ID1 )", "Updateable"); + UValidate.Check(sql.Key, @"UPDATE `Diary` SET + `TypeID` = @Const0 WHERE ( `ID` = @ID1 )", "Updateable"); } }