Exemple #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)
        {
            OracleWhereClauseVisitor visitor = new OracleWhereClauseVisitor(this.parameters);

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

            queryPartsAggregator.WhereParts.Add(whereParts);

            base.VisitWhereClause(whereClause, queryModel, index);
        }
        /// <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)
        {
            OracleWherePartsCommandBuilder whereBuilder = new OracleWherePartsCommandBuilder(this.commandBuilder.Parameters);

            OracleWhereClauseVisitor visitor = new OracleWhereClauseVisitor();

            visitor.Translate(whereClause.Predicate, whereBuilder);

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

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