aldaflux/pgsql-doctrine-random-function 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Latest Stable Version Total Downloads License

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-16