mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 增加 IFreeSql.GlobalFilter 全局过滤器;
- 移除 TableAttribute.SelectFilter 功能;
This commit is contained in:
		@@ -87,12 +87,6 @@ namespace FreeSql.Odbc.PostgreSQL
 | 
			
		||||
                if (!string.IsNullOrEmpty(_tables[0].Cascade))
 | 
			
		||||
                    sbnav.Append(" AND (").Append(_tables[0].Cascade).Append(")");
 | 
			
		||||
 | 
			
		||||
                foreach (var tb in _tables)
 | 
			
		||||
                {
 | 
			
		||||
                    if (tb.Type == SelectTableInfoType.Parent) continue;
 | 
			
		||||
                    if (string.IsNullOrEmpty(tb.Table.SelectFilter) == false)
 | 
			
		||||
                        sbnav.Append(" AND (").Append(tb.Table.SelectFilter.Replace("a.", $"{tb.Alias}.")).Append(")");
 | 
			
		||||
                }
 | 
			
		||||
                if (sbnav.Length > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    sb.Append(" \r\nWHERE ").Append(sbnav.Remove(0, 5));
 | 
			
		||||
 
 | 
			
		||||
@@ -45,9 +45,10 @@ namespace FreeSql.Odbc.PostgreSQL
 | 
			
		||||
        internal CommonExpression InternalCommonExpression { get; }
 | 
			
		||||
 | 
			
		||||
        public void Transaction(Action handler) => Ado.Transaction(handler);
 | 
			
		||||
 | 
			
		||||
        public void Transaction(Action handler, TimeSpan timeout) => Ado.Transaction(handler, timeout);
 | 
			
		||||
 | 
			
		||||
        public GlobalFilter GlobalFilter { get; } = new GlobalFilter();
 | 
			
		||||
 | 
			
		||||
        ~OdbcPostgreSQLProvider()
 | 
			
		||||
        {
 | 
			
		||||
            this.Dispose();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user