mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 01:05:27 +08:00 
			
		
		
		
	内部 SQL 格式优化
This commit is contained in:
		@@ -54,7 +54,7 @@ namespace FreeSql.MySql.Curd
 | 
			
		||||
                                .AsTable((_, __) => _tableRule?.Invoke(__)).AsType(_table.Type)
 | 
			
		||||
                                .DisableGlobalFilter()
 | 
			
		||||
                                .WhereDynamic(rowd)
 | 
			
		||||
                                .Limit(1).ToSql("1").Replace("\r\n", "\r\n\t")).Append(")"));
 | 
			
		||||
                                .Limit(1).ToSql("1").Replace(" \r\n", " \r\n    ")).Append(")"));
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                if (string.IsNullOrEmpty(sql)) return null;
 | 
			
		||||
 
 | 
			
		||||
@@ -25,7 +25,7 @@ namespace FreeSql.MySql.Curd
 | 
			
		||||
            var tbUnionsGt0 = tbUnions.Count > 1;
 | 
			
		||||
            for (var tbUnionsIdx = 0; tbUnionsIdx < tbUnions.Count; tbUnionsIdx++)
 | 
			
		||||
            {
 | 
			
		||||
                if (tbUnionsIdx > 0) sb.Append(" \r\n\r\nUNION ALL\r\n\r\n");
 | 
			
		||||
                if (tbUnionsIdx > 0) sb.Append("\r\n \r\nUNION ALL\r\n \r\n");
 | 
			
		||||
                if (tbUnionsGt0) sb.Append(_select).Append(" * from (");
 | 
			
		||||
                var tbUnion = tbUnions[tbUnionsIdx];
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user