博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ORM中一个很重要的方法BuildConditionSetSql
阅读量:4364 次
发布时间:2019-06-07

本文共 601 字,大约阅读时间需要 2 分钟。

///<summary>

///根据查询条件集合生成Sql语句与Sql参数

///<summary>

protected System.String BuildConditionSetSql(ConditionSet conditionSet,IList outputParams)

{

  List<System.String> conditions=new List<System.String>();

  foreach(Condition subCondition in conditionSet.SubConditions)

  {

    System.String str=BuildConditionSql(subCondition,outputParams);

    if(!System.String.IsNullOrEmpty(str)) conditions.Add(str);

  }

  if(conditions.Count==0) return null;

  return "("+System.String.Join(" "+conditionSet.JoinType+" ",conditions.ToArray())+")"

}

转载于:https://www.cnblogs.com/szjdw/archive/2012/03/28/2421860.html

你可能感兴趣的文章
JS命名规范
查看>>
Day 6-1计算机网络基础&TCP/IP
查看>>
Django 入门案例开发
查看>>
TP里where的查询方式,比如or应该怎么写?
查看>>
spring注解说明之Spring2.5 注解介绍(3.0通用)
查看>>
【转载】android笔记--Intent和IntentFilter详解
查看>>
php提供图片下载的方法
查看>>
使用Keil下载单独的Hex文件到单片机内
查看>>
EditPlus中文版 安装教程
查看>>
ASP.NET MVC4使用JCrop裁剪图片并上传
查看>>
poj1564
查看>>
string类的常用的几个小东西find,substr
查看>>
玲珑OJ1088【蜜汁尺取】
查看>>
什么时候应该使用C#的属性
查看>>
Java多线程
查看>>
学习和复习过程
查看>>
CSS 列表
查看>>
MyBatis代码生成器(maven插件方式和控制台命令运行方式)
查看>>
Run “mvn clean install” in Eclipse
查看>>
实验二
查看>>