From b1fdba86e8edd8c3bd9af33e905786dea368aa14 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 4 Jun 2019 17:15:38 +0800 Subject: [PATCH] Update demo --- Src/Asp.Net/SqliteTest/UnitTest/UCodeFirst.cs | 2 -- Src/Asp.Net/SqliteTest/UnitTest/UJson.cs | 2 +- Src/Asp.Net/SqliteTest/UnitTest/UQueryable.cs | 12 ++++++------ Src/Asp.Net/SqliteTest/UnitTest/Updateable.cs | 8 ++++---- 4 files changed, 11 insertions(+), 13 deletions(-) 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 li