2017 © Pedro Peláez
 

symfony-bundle pgsql-doctrine-random-function

PostgreSQL RANDOM() function for Doctrine ORM

image

qbbr/pgsql-doctrine-random-function

PostgreSQL RANDOM() function for Doctrine ORM

  • Saturday, March 12, 2016
  • by qbbr
  • Repository
  • 1 Watchers
  • 1 Stars
  • 7,267 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 10 % Grown

The README.md

PgsqlDoctrineRandomFunction

PostgreSQL RANDOM() function for Doctrine ORM, (*1)

Latest Stable Version Total Downloads License, (*2)

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();

The Versions

12/03 2016

dev-master

9999999-dev https://github.com/qbbr/PgsqlDoctrineRandomFunction

PostgreSQL RANDOM() function for Doctrine ORM

  Sources   Download

MIT

The Requires

 

function postgresql doctrine symfony pgsql random qbbr

12/03 2016

1.0.1

1.0.1.0 https://github.com/qbbr/PgsqlDoctrineRandomFunction

PostgreSQL RANDOM() function for Doctrine ORM

  Sources   Download

MIT

The Requires

 

function postgresql doctrine symfony pgsql random qbbr

11/03 2016

1.0.0

1.0.0.0 https://github.com/qbbr/PgsqlDoctrineRandomFunction

PostgreSQL RANDOM() function for Doctrine ORM

  Sources   Download

MIT

The Requires

 

function postgresql doctrine symfony pgsql random qbbr