2017 © Pedro PelĂĄez
 

library doctrine-functions-psql

Doctrine DQL Functions for PostgreSQL

image

gesdinet/doctrine-functions-psql

Doctrine DQL Functions for PostgreSQL

  • Wednesday, October 22, 2014
  • by markitosgv
  • Repository
  • 4 Watchers
  • 5 Stars
  • 4,054 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 23 % Grown

The README.md

Doctrine Functions for PostgreSQL

This package contains doctrine functions for PostgreSQL., (*1)

List of available functions:, (*2)

  • DAYOFWEEK(expr)
  • WEEK(expr)
  • DAYOFMONTH(expr)
  • DAYOFYEAR(expr)
  • HOUR(expr)
  • MINUTE(expr)
  • MONTH(expr)
  • QUARTER(expr)
  • SECOND(expr)
  • YEAR(expr)

Edit this file in your pull request to add your functions to the list., (*3)

Install

Via Composer, (*4)

``` bash $ composer require gesdinet/doctrine-functions-psql, (*5)


## Usage ### 1) Doctrine Only According to the [Doctrine documentation](http://docs.doctrine-project.org/en/2.0.x/cookbook/dql-user-defined-functions.html "Doctrine documentation") you can register the functions in this package this way. ```php <?php $config = new \Doctrine\ORM\Configuration(); $config->addCustomDatetimeFunction('year', 'Gesdinet\DQL\Datetime\Year'); $em = EntityManager::create($dbParams, $config);

2) Using Symfony 2

With Symfony 2 you can register your functions directly in the config.yml file., (*6)

doctrine:
    orm:
        dql:
            datetime_functions:
                month:     Gesdinet\DQL\Datetime\Month
                year:      Gesdinet\DQL\Datetime\Year
                # etc

Contributing

Feel free to make a PR with new functions and tests, (*7)

Credits

Based on luxifer doctrine-functions for MySQL, (*8)

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

22/10 2014

dev-master

9999999-dev https://github.com/gesdinet/doctrine-functions-psql

Doctrine DQL Functions for PostgreSQL

  Sources   Download

MIT

The Requires

 

The Development Requires

database postgresql psql dql

22/10 2014

v0.1.0

0.1.0.0 https://github.com/gesdinet/doctrine-functions-psql

Doctrine DQL Functions for PostgreSQL

  Sources   Download

MIT

The Requires

 

The Development Requires

database postgresql psql dql