Example #1
0
        /// <summary>
        /// 值不包含在一段子查询中的条件解析,子查询返回的必须是单列数据
        /// </summary>
        /// <param name="condition">需要解析的条件对象</param>
        /// <returns>返回解析后的条件字符串</returns>
        protected override string NotSQLInParse(SQLNotInCondition condition)
        {
            StringBuilder conditionStr = new StringBuilder(" ");
            string        queryColName = condition.SearchColumn.CurrentSearcher.TableName + "." + condition.SearchColumn.ColumnName;

            if (string.IsNullOrEmpty(condition.SearchColumn.ConditionString))
            {
                conditionStr.Append(queryColName);
            }
            else
            {
                conditionStr.Append(condition.SearchColumn.ConditionString.Replace(SQLPlaceholder.ColName, queryColName));
            }

            conditionStr.Append(" NOT IN ( ");
            conditionStr.Append(condition.SQL);
            conditionStr.Append(") ");

            return(conditionStr.ToString());
        }
Example #2
0
        /// <summary>
        /// 值不包含在一段子查询中的条件解析,子查询返回的必须是单列数据
        /// </summary>
        /// <param name="condition">需要解析的条件对象</param>
        /// <returns>返回解析后的条件字符串</returns>
        protected override string NotSQLInParse(SQLNotInCondition condition)
        {
            StringBuilder conditionStr = new StringBuilder(" ");
            string queryColName = condition.SearchColumn.CurrentSearcher.TableName + "." + condition.SearchColumn.ColumnName;

            if (string.IsNullOrEmpty(condition.SearchColumn.ConditionString))
            {
                conditionStr.Append(queryColName);
            }
            else
            {
                conditionStr.Append(condition.SearchColumn.ConditionString.Replace(SQLPlaceholder.ColName, queryColName));
            }

            conditionStr.Append(" NOT IN ( ");
            conditionStr.Append(condition.SQL);
            conditionStr.Append(") ");

            return conditionStr.ToString();
        }
Example #3
0
 /// <summary>
 /// 子查询非包含条件
 /// </summary>
 /// <param name="relation">条件关系</param>
 /// <param name="column">查询字段对象</param>
 /// <param name="sql">子查询SQL</param>
 /// <returns>返回子查询非包含条件对象</returns>
 public static SQLNotInCondition SQLNotIn(ConditionRelation relation, SearchColumn column, string sql)
 {
     SQLNotInCondition cond = new SQLNotInCondition(relation, column, sql);
     return cond;
 }
Example #4
0
 /// <summary>
 /// 子查询非包含条件
 /// </summary>
 /// <param name="column">查询字段对象</param>
 /// <param name="sql">子查询SQL</param>
 /// <returns>返回子查询非包含条件对象</returns>
 public static SQLNotInCondition SQLNotIn(SearchColumn column, string sql)
 {
     SQLNotInCondition cond = new SQLNotInCondition(column, sql);
     return cond;
 }
Example #5
0
 /// <summary>
 /// 子查询非包含条件
 /// </summary>
 /// <param name="sql">子查询SQL</param>
 /// <returns>返回子查询非包含条件对象</returns>
 public static SQLNotInCondition SQLNotIn(string sql)
 {
     SQLNotInCondition cond = new SQLNotInCondition(sql);
     return cond;
 }
Example #6
0
        /// <summary>
        /// 子查询非包含条件
        /// </summary>
        /// <param name="relation">条件关系</param>
        /// <param name="column">查询字段对象</param>
        /// <param name="sql">子查询SQL</param>
        /// <returns>返回子查询非包含条件对象</returns>
        public static SQLNotInCondition SQLNotIn(ConditionRelation relation, SearchColumn column, string sql)
        {
            SQLNotInCondition cond = new SQLNotInCondition(relation, column, sql);

            return(cond);
        }
Example #7
0
        /// <summary>
        /// 子查询非包含条件
        /// </summary>
        /// <param name="sql">子查询SQL</param>
        /// <returns>返回子查询非包含条件对象</returns>
        public static SQLNotInCondition SQLNotIn(string sql)
        {
            SQLNotInCondition cond = new SQLNotInCondition(sql);

            return(cond);
        }