query.inc 文件:

sql语句:

 $this->condition($field);
1707 line
public function condition($field, $value = NULL, $operator = NULL) {
if (!isset($operator)) {
if (is_array($value)) {
$operator = 'IN';
}
elseif (!isset($value)) {
$operator = 'IS NULL';
}
else {
$operator = '=';
}
}
$this->conditions[] = array(
'field' => $field,
'value' => $value,
'operator' => $operator,
); $this->changed = TRUE; return $this;
} 这里会放到 $this->conditions[] 中
$operator = $connection->mapConditionOperator($condition['operator']);
mapConditionOperator 函数:
protected function mapConditionOperator($operator) {
// $specials does not use drupal_static as its value never changes.
static $specials = array(
'BETWEEN' => array('delimiter' => ' AND '),
'IN' => array('delimiter' => ', ', 'prefix' => ' (', 'postfix' => ')'),
'NOT IN' => array('delimiter' => ', ', 'prefix' => ' (', 'postfix' => ')'),
'EXISTS' => array('prefix' => ' (', 'postfix' => ')'),
'NOT EXISTS' => array('prefix' => ' (', 'postfix' => ')'),
'IS NULL' => array('use_value' => FALSE),
'IS NOT NULL' => array('use_value' => FALSE),
// Use backslash for escaping wildcard characters.
'LIKE' => array('postfix' => " ESCAPE '\\\\'"),
'NOT LIKE' => array('postfix' => " ESCAPE '\\\\'"),
// These ones are here for performance reasons.
'=' => array(),
'<' => array(),
'>' => array(),
'>=' => array(),
'<=' => array(),
);
if (isset($specials[$operator])) {
$return = $specials[$operator];
}
else {
// We need to upper case because PHP index matches are case sensitive but
// do not need the more expensive drupal_strtoupper because SQL statements are ASCII.
$operator = strtoupper($operator);
$return = isset($specials[$operator]) ? $specials[$operator] : array();
} $return += array('operator' => $operator); return $return;
这些应该是condition支持的吧
												

最新文章

  1. 关于display:none 和visibility:hidden 的区别
  2. 使用Dotfuscator 进行.Net代码混淆 代码加密的方法
  3. DIV的Position属性和DIV嵌套DIV
  4. WinAPI: GetKeyNameText - 根据键盘消息获取按键名称
  5. 提升效率(时间准确性),减少时间和资源的消耗——由89C52/89C51的定时器中断引出的一些问题
  6. php课程---练习(发布新闻)
  7. [CLR via C#]16. 数组
  8. Android实现拖动进度条改变图片透明度
  9. js backbone
  10. 201521123005 《java程序设计》 第六周学习总结
  11. selenium+python自动化测试系列(二):AutoIt工具实现本地文件上传
  12. 【翻译】《向“弹跳球”演示程序添加新功能》 in MDN
  13. 高可用Redis(十二):Redis Cluster
  14. React Native 断点调试 跨域资源加载出错问题的原因分析
  15. 使用cloudreve搭建个人网盘
  16. 如何快速上手一个新技术之vue学习经验
  17. Ubuntu16下apache2安装ssl阿里云证书
  18. 先从一个 libev 的 demo 入手
  19. java ==与equals()方法的总结
  20. 使外部主机可访问Django服务

热门文章

  1. 用exec调用带有output输出参数的存储过程
  2. Zabbix二次开发_01基础
  3. bzoj3631 松鼠的新家
  4. Java学习——Eclipse下载,java配置,新建,输入输出
  5. 术语-服务:SaaS
  6. [转]NuGet 包升级
  7. Linux 期中架构 SSH
  8. unity3d中gameObject捕获鼠标点击
  9. SQL Server占用服务器内存过高
  10. CSS3基础