• phalcon: 查找记录(Finding Records)可用的查询设置如下:


    可用的查询设置如下:

    参数描述举例
    conditions Search conditions for the find operation. Is used to extract only those records that fulfill a specified criterion. By default PhalconMvcModel 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, PhalconMvcModel reads the latest available data, setting exclusive locks on each row it reads “for_update” => true
    shared_lock With this option, PhalconMvcModel 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:

  • 相关阅读:
    [Algo] 306. Check If Linked List Is Palindrome
    [Algo] 42. Partition Linked List
    [Algo] 20. Search In Unknown Sized Sorted Array
    [LC] 1167. Minimum Cost to Connect Sticks
    [LC] 212. Word Search II
    安装oracle developer 10g 时报错,提示must be 5.0, 5.1, 5.2 or 6.1 . Actual 6.2
    APP-INV-05577
    客户化的并发程序出现黄条警告,并无法输出内容
    EBS Concurrent Manager(并发管理器)异常处理[final]【转】
    oracle 通过透明网关gateway 连接sqlserver
  • 原文地址:https://www.cnblogs.com/achengmu/p/5879495.html
Copyright © 2020-2023  润新知