aldaflux/pgsql-doctrine-random-function
Composer 安装命令:
composer require aldaflux/pgsql-doctrine-random-function
包简介
PostgreSQL RANDOM() function for Doctrine ORM, fork from https://packagist.org/packages/qbbr/pgsql-doctrine-random-function
README 文档
README
PostgreSQL RANDOM() function for Doctrine ORM
Installation
Step 1: Download the package
$ composer require aldaflux/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();
统计信息
- 总下载量: 90
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-16