/// <summary>
 /// 初始化一个<see cref="SqlBuilderBase"/>类型的实例
 /// </summary>
 /// <param name="matedata">实体元数据解析器</param>
 /// <param name="tableDatabase">表数据库</param>
 /// <param name="parameterManager">参数管理器</param>
 protected SqlBuilderBase(IEntityMatedata matedata = null, ITableDatabase tableDatabase = null, IParameterManager parameterManager = null)
 {
     EntityMatedata    = matedata;
     TableDatabase     = tableDatabase;
     _parameterManager = parameterManager;
     EntityResolver    = new EntityResolver(matedata);
     AliasRegister     = new EntityAliasRegister();
     Pager             = new Pager();
     UnionItems        = new List <BuilderItem>();
     CteItems          = new List <BuilderItem>();
     _excludedFilters  = new List <Type>();
 }
 /// <summary>
 /// 清空并初始化
 /// </summary>
 public ISqlBuilder Clear()
 {
     AliasRegister = new EntityAliasRegister();
     ClearSelect();
     ClearFrom();
     ClearJoin();
     ClearWhere();
     ClearGroupBy();
     ClearOrderBy();
     ClearSqlParams();
     ClearPageParams();
     ClearUnionBuilders();
     ClearCte();
     return(this);
 }