可用的查询设置如下:

参数 描述 举例
conditions Search conditions for the find operation. Is used to extract only those records that fulfill a specified criterion. By default Phalcon\Mvc\Model assumes the first parameter are the conditions. “conditions” => “name LIKE ‘steve%’”
columns Return specific columns instead of the full columns in the model. When using this option an incomplete object is returned “columns” => “id, name”
bind Bind is used together with options, by replacing placeholders and escaping values thus increasing security “bind” => array(“status” => “A”, “type” => “some-time”)
bindTypes When binding parameters, you can use this parameter to define additional casting to the bound parameters increasing even more the security “bindTypes” => array(Column::BIND_TYPE_STR, Column::BIND_TYPE_INT)
order Is used to sort the resultset. Use one or more fields separated by commas. “order” => “name DESC, status”
limit Limit the results of the query to results to certain range “limit” => 10 / “limit” => array(“number” => 10, “offset” => 5)
group Allows to collect data across multiple records and group the results by one or more columns “group” => “name, status”
for_update With this option, Phalcon\Mvc\Model reads the latest available data, setting exclusive locks on each row it reads “for_update” => true
shared_lock With this option, Phalcon\Mvc\Model reads the latest available data, setting shared locks on each row it reads “shared_lock” => true
cache Cache the resultset, reducing the continuous access to the relational system “cache” => array(“lifetime” => 3600, “key” => “my-find-key”)
hydration Sets the hydration strategy to represent each returned record in the result “hydration” => Resultset::HYDRATE_OBJECTS

If you prefer, there is also available a way to create queries in an object-oriented way, instead of using an array of parameters:

phalcon: 查找记录(Finding Records)可用的查询设置如下:的更多相关文章

  1. Mysql 慢查询设置

    Mysql慢查询设置 分析MySQL语句查询性能的方法除了使用 EXPLAIN 输出执行计划,还可以让MySQL记录下查询超过指定时间的语句,我们将超过指定时间的SQL语句查询称为“慢查询”. === ...

  2. Winform 判断打印机是否可用,实现设置默认打印机功能

    Winform 判断打印机是否可用,实现设置默认打印机功能 http://www.cnblogs.com/zfanlong1314/p/3878563.html

  3. solr默认查询设置

    在搜索过程中,如果我们每次请求中都传入很多固定的参数,会很繁琐,这里再solrconfig.xml中初始化定义一些不经常改动的搜索参数: <requestHandler name="/ ...

  4. android 检查网络是否可用,如果不可用弹出设置,让用户改变

    /** * 校验网络,如果没有网络,返回true * * @return boolean */ @Override public boolean hasInternetConnected() { Co ...

  5. 深入mysql慢查询设置的详解

    set long_query_time=1; #设置慢查询时间为1 秒; set global slow_query_log=on; #开启慢查询日志; show global status like ...

  6. 01_Linux系统系统语言查询,设置Xshell工具,中文显示,测试Xshell中文字符显示,Linux中文显示乱码设置

              Xshell是一个强大的安全终端模拟软件,它支持SSH1,SSH2,以及Microsoft Windows平台的TELNETNetSarang Xshell 4 Build 0 ...

  7. 7.6 Models -- Finding Records

    Ember Data的store为检索一个类型的records提供一个接口. 一.Retrieving a single record(检索单记录) 1. 通过type和ID使用store.findR ...

  8. datatable表格框架服务器端分页查询设置

    更多内容推荐微信公众号,欢迎关注: js代码如下: $('#mytable').dataTable( { "bServerSide": true, //开启服务器模式,使用服务器端 ...

  9. mysql慢查询设置

    不同版本的mysql命令和配置不一样,以下是2个版本 修改配置文件 log-slow-queries=/alidata/mysql-log/mysql-slow.log long_query_time ...

随机推荐

  1. Java中的类加载器

    转载:http://blog.csdn.net/zhangjg_blog/article/details/16102131 从java的动态性到类加载机制   我们知道,Java是一种动态语言.那么怎 ...

  2. 查看Mac电脑的开机记录

    回家以后,发现电脑前的地面上有烟灰.我记不住是不是我抽烟时掉的了.当然,如果不是我掉的,就是别人掉的了.要是别人掉的,估计是坐在我这玩儿电脑的时候掉的了.查一下开机记录吧.打开终端,输入“last|g ...

  3. norm函数

    如果A为向量 norm(A,p) 返回向量A的p范数. norm(A) 返回向量A的2范数,即等价于norm(A,2).

  4. Json 入门例子【3】

    Javascript 和Jquery 通过ID 获取值. <script> var txt1 = [{ "CityId": 18, "CityName&quo ...

  5. SQL语句like子句中的转义符

    如果想在SQL LIKE里查询有下划线'_'或是'%'等值的记录,直接写成like 'XXX_XX',则会把'_'当成是like的通配符.SQL里提供了 escape子句来处理这种情况,escape可 ...

  6. [SAP ABAP开发技术总结]ABAP读写、解析XML文件

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  7. [SAP ABAP开发技术总结]屏幕跳转

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  8. 记CVTE2014年春季招聘实习生求职历程

    进度:目前已经过了网测 明天一面,好紧张,人生第一次实习面试.据说只有一分钟. 网测; 首先在http://exam.cvte.com/ 注册了账号,然后填写相关的个人信息,这里要仔细填写,因为它最后 ...

  9. iOS - OC Enum 枚举

    前言 iOS 5.0 之后,提供了新的枚举定义方式,定义枚举的同时,可以指定枚举中数据的类型. typedef NS_OPTIONS(_type, _name) new; -> 位移的,可以使用 ...

  10. spring之aop概念和配置

    面向切面的一些概念: 简单说: 连接点就一些方法,在这些方法基础上需要额外的一些业务需求处理. 切入点就是方法所代表的功能点组合起来的功能需求. 通知就是那些额外的操作. 织入就是使用代理实现整个切入 ...