Esempio n. 1
0
 /// <summary>
 /// 初始化Sql生成器
 /// </summary>
 /// <param name="matedata">实体元数据解析器</param>
 /// <param name="parameterManager">参数管理器</param>
 protected SqlBuilderBase(IEntityMatedata matedata = null, IParameterManager parameterManager = null)
 {
     EntityMatedata    = matedata;
     EntityResolver    = new EntityResolver(matedata);
     AliasRegister     = new EntityAliasRegister();
     _parameterManager = parameterManager;
 }
Esempio n. 2
0
        /// <summary>
        /// 清空初始化
        /// </summary>
        public void Clear()
        {
            AliasRegister     = new EntityAliasRegister();
            _parameterManager = CreatepParameterManager();
            _selectClause     = CreateSelectClause();
            _fromClause       = CreateFromClause();
            _joinClause       = CreateJoinClause();
            _whereClause      = CreatewWhereClause();
            _groupByClause    = CreateGroupByClause();
            _orderByClause    = CreateOrderByClause();
            _pager            = null;
            _skipCountParam   = null;
            _pageSizeParam    = null;

            SqlActionType = SqlActionType.Query;
        }