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 4002 Find the maximum
Find the maximum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) ...
- HTML基础 整理
HTML:超文本传输协议 (Hyper Markup Language) CSS:网页美化 (Cascading Style Sheets) JS:java-scipt 脚本语言 Dreamweave ...
- 【转载】linux内核笔记之高端内存映射
原文:linux内核笔记之高端内存映射 在32位的系统上,内核使用第3GB~第4GB的线性地址空间,共1GB大小.内核将其中的前896MB与物理内存的0~896MB进行直接映射,即线性映射,将剩余的1 ...
- ubuntu su 密码
Ubuntu的默认root密码是随机的,即每次开机都有一个新的root密码. Ubuntu刚安装后,不能在terminal中运行su命令,因为root没有默认密码,需要手动设定.以安装ubuntu时输 ...
- 各种操作中心Operation Center一览
Operation Center在中国可能有很多种名称,例如指挥中心.运维室.总控中心等等,国外可能也有很多名称,不管名称如何,任何一个上规模得数据总心或者运维单位一般都有一个这样得中心,来负责所管理 ...
- Spring整合Hibernate图文步骤
首先建立java Project工程 点击Finish完成 添加Hibernate和Spring所需要的jar包还有Mysql连接的jar包 创建Dao层,Dao层实现,Model层,Service层 ...
- JavaScript经典代码【一】【javascript HTML控件获取值】
javascript HTML控件获取值 1.下拉列表框选定值 ddlPageSize.options[ddlPageSize.selectedIndex].value ddlPageSize.opt ...
- Linux 下常用解压命令(转载)
Linux下常用文件解压(包括rpm.deb包) Linux下怎么解后缀名是gzip的文件?1.以.a为扩展名的文件:#tar xv file.a2.以.z为扩展名的文件:#uncompress fi ...
- iOS案例:读取指定目录下的文件列表
// // main.m // 读取指定目录下的文件列表 // // Created by Apple on 15/11/24. // Copyright © 2015年 Apple. All rig ...
- Yii javascript 的结合 账号禁用 激活 的设置。
2014-02-16 控制器中的代码: public function actionUpdown(){ //print_r($_POST);die(); if(Buser::model()->u ...