phalcon: 查找记录(Finding Records)可用的查询设置如下:
可用的查询设置如下:
参数 | 描述 | 举例 |
---|---|---|
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)可用的查询设置如下:的更多相关文章
- Mysql 慢查询设置
Mysql慢查询设置 分析MySQL语句查询性能的方法除了使用 EXPLAIN 输出执行计划,还可以让MySQL记录下查询超过指定时间的语句,我们将超过指定时间的SQL语句查询称为“慢查询”. === ...
- Winform 判断打印机是否可用,实现设置默认打印机功能
Winform 判断打印机是否可用,实现设置默认打印机功能 http://www.cnblogs.com/zfanlong1314/p/3878563.html
- solr默认查询设置
在搜索过程中,如果我们每次请求中都传入很多固定的参数,会很繁琐,这里再solrconfig.xml中初始化定义一些不经常改动的搜索参数: <requestHandler name="/ ...
- android 检查网络是否可用,如果不可用弹出设置,让用户改变
/** * 校验网络,如果没有网络,返回true * * @return boolean */ @Override public boolean hasInternetConnected() { Co ...
- 深入mysql慢查询设置的详解
set long_query_time=1; #设置慢查询时间为1 秒; set global slow_query_log=on; #开启慢查询日志; show global status like ...
- 01_Linux系统系统语言查询,设置Xshell工具,中文显示,测试Xshell中文字符显示,Linux中文显示乱码设置
Xshell是一个强大的安全终端模拟软件,它支持SSH1,SSH2,以及Microsoft Windows平台的TELNETNetSarang Xshell 4 Build 0 ...
- 7.6 Models -- Finding Records
Ember Data的store为检索一个类型的records提供一个接口. 一.Retrieving a single record(检索单记录) 1. 通过type和ID使用store.findR ...
- datatable表格框架服务器端分页查询设置
更多内容推荐微信公众号,欢迎关注: js代码如下: $('#mytable').dataTable( { "bServerSide": true, //开启服务器模式,使用服务器端 ...
- mysql慢查询设置
不同版本的mysql命令和配置不一样,以下是2个版本 修改配置文件 log-slow-queries=/alidata/mysql-log/mysql-slow.log long_query_time ...
随机推荐
- hdu 1205 从整体考虑
吃糖果 Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submiss ...
- 大型网站技术架构介绍--squid
一.大型网站技术架构介绍 1.pv高 ip高 并发量 2.大型网站架构重点 1. 高性能:响应时间,TPS,系统性能计数器.缓存,消息队列等. 高可用性High Availabilit ...
- Codeforces Round #372 (Div. 2) C
Description ZS the Coder is playing a game. There is a number displayed on the screen and there are ...
- MVC api json 格式
输出json var formatters = config.Formatters.Where(formatter => formatter.SupportedMediaTypes.Where( ...
- javascript实现非递归--归并排序
另一道面试题是实现归并排序,当然,本人很不喜欢递归法,因为递归一般都是没有迭代法好.所以首选都是用迭代法,但是迭代法确实是难做啊,至底而上的思想不好把握. 这是我的实现代码 /* * * 非递归版归并 ...
- JLINK仿真器与ST-LINK仿真器的安装与配置.pdf
JLINK仿真器与ST-LINK仿真器的安装与配置.pdf 工欲善其事,......stm32的开发环境搭建 观看地址 说到仿真器,首先要了解一下JTAG. JTAG协议 JTAG(Joint Te ...
- nl2br
PHP中 在字符串所有新行之前插入 HTML 换行标记 说明 string nl2br ( string $string [, bool $is_xhtml = true ] ) 在字符串 str ...
- Python3基础 三元表达式实例
镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ ...
- Linux常见问题的处理方法(长期更新)
一.使用sudo命令时xxx is not in the sudoers file. This incident will be reported. 1.su -,输入root的密码完成身份切换. 2 ...
- Hibernate+Struts2+jsp 修改用户信息
在用户列表页面点击修改,进入修改页面 修改薪酬为555,点击提交,重新跳回该页面 修改成功 关键代码如下 基层的代码,这里增加了一个根据用户id查询的方法 dao层 //修改 public USer ...