qbbr/pgsql-doctrine-random-function
最新稳定版本:1.0.1
Composer 安装命令:
composer require qbbr/pgsql-doctrine-random-function
包简介
PostgreSQL RANDOM() function for Doctrine ORM
README 文档
README
PostgreSQL RANDOM() function for Doctrine ORM
Installation
Step 1: Download the package
$ composer require qbbr/pgsql-doctrine-random-function
Step 2: Configuration
# app/config/config.yml doctrine: orm: # ... dql: numeric_functions: Random: Qbbr\PgsqlDoctrineRandomFunction\DQL\RandomFunction
Usage
$em = $this->getDoctrine()->getManager(); $result = $em->createQueryBuilder() ->select('e') ->from('AppBundle:Entity', 'e') ->orderBy('RANDOM()') ->setMaxResults(10) ->getQuery() ->getResult();
统计信息
- 总下载量: 113.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-11