示例#1
0
        /// <summary>
        /// 解析 Where 语句
        /// </summary>
        /// <param name="whereClause"></param>
        /// <param name="queryModel"></param>
        /// <param name="index"></param>
        public override void VisitWhereClause(WhereClause whereClause, QueryModel queryModel, int index)
        {
            MySqlWhereClauseVisitor visitor = new MySqlWhereClauseVisitor(this.parameters);

            string whereParts = visitor.Translate(whereClause.Predicate);

            queryPartsAggregator.WhereParts.Add(whereParts);

            base.VisitWhereClause(whereClause, queryModel, index);
        }
示例#2
0
        /// <summary>
        /// 解析 Where 语句
        /// </summary>
        /// <param name="whereClause"></param>
        /// <param name="queryModel"></param>
        /// <param name="index"></param>
        public override void VisitWhereClause(WhereClause whereClause, QueryModel queryModel, int index)
        {
            MySqlWherePartsCommandBuilder whereBuilder = new MySqlWherePartsCommandBuilder(this.commandBuilder.Parameters);

            MySqlWhereClauseVisitor visitor = new MySqlWhereClauseVisitor();

            visitor.Translate(whereClause.Predicate, whereBuilder);

            commandBuilder.WhereParts.Add(whereBuilder.ToString());

            base.VisitWhereClause(whereClause, queryModel, index);
        }