2017 © Pedro Peláez
 

library DoctrineExtensions

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

image

beberlei/DoctrineExtensions

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  • Saturday, July 14, 2018
  • by beberlei
  • Repository
  • 46 Watchers
  • 1009 Stars
  • 5,538,395 Installations
  • PHP
  • 108 Dependents
  • 8 Suggesters
  • 300 Forks
  • 0 Open issues
  • 37 Versions
  • 9 % Grown

The README.md

DoctrineExtensions

Build Status Build Status Packagist Packagist Packagist Packagist, (*1)

A set of extensions to Doctrine 2 that add support for functions available in MySQL, Oracle, PostgreSQL and SQLite., (*2)

DB Functions
MySQL ACOS, ADDTIME, AES_DECRYPT, AES_ENCRYPT, ANY_VALUE, ASCII, ASIN, ATAN, ATAN2, BINARY, BIT_COUNT, BIT_XOR, CAST, CEIL, CHAR_LENGTH, COLLATE, CONCAT_WS, CONVERT_TZ, COS, COT, COUNTIF, CRC32, DATE, DATE_FORMAT, DATEADD, DATEDIFF, DATESUB, DAY, DAYNAME, DAYOFWEEK, DAYOFYEAR, DEGREES, DIV, EXP, EXTRACT, FIELD, FIND_IN_SET, FLOOR, FORMAT, FROM_BASE64, FROM_UNIXTIME, GREATEST, GROUP_CONCAT, HEX, HOUR, IFELSE, IFNULL, INET_ATON, INET_NTOA, INET6_ATON, INET6_NTOA, INSTR, IS_IPV4, IS_IPV4_COMPAT, IS_IPV4_MAPPED, IS_IPV6, JSON_CONTAINS, JSON_DEPTH, JSON_LENGTH, LAG, LAST_DAY, LEAD, LEAST, LOG, LOG10, LOG2, LPAD, MAKEDATE, MATCH, MD5, MINUTE, MONTH, MONTHNAME, NOW, NULLIF, OVER, PERIOD_DIFF, PI, POWER, QUARTER, RADIANS, RAND, REGEXP, REPLACE, ROUND, RPAD, SECOND, SECTOTIME, SHA1, SHA2, SIN, SOUNDEX, STD, STDDEV, STRTODATE, STR_TO_DATE, SUBSTRING_INDEX, TAN, TIME, TIMEDIFF, TIMESTAMPADD, TIMESTAMPDIFF, TIMETOSEC, TRUNCATE, UNHEX, UNIX_TIMESTAMP, UTC_TIMESTAMP, UUID_SHORT, VARIANCE, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARMONTH, YEARWEEK
Oracle CEIL, DAY, FLOOR, HOUR, LISTAGG, MINUTE, MONTH, NVL, SECOND, TO_CHAR, TO_DATE, TRUNC, YEAR
SQLite CASE WHEN THEN ELSE END, DATE, DATE_FORMAT*, DAY, HOUR, IFNULL, JULIANDAY, MINUTE, MONTH, REPLACE, ROUND, SECOND, STRFTIME, WEEK, WEEKDAY, YEAR
PostgreSQL AT_TIME_ZONE, COUNT_FILTER, DATE, DATE_PART, DATE_TRUNC, DAY, EXTRACT, GREATEST, HOUR, LEAST, MINUTE, MONTH, REGEXP_REPLACE, SECOND, STRING_AGG, TO_CHAR, TO_DATE, YEAR

Note: SQLite date functions are implemented as strftime(format, value). SQLite only supports the most common formats, so date_format will convert the mysql substitutions to the closest available SQLite substitutions. This means date_format(field, '%b %D %Y') -> Jan 1st 2015 becomes strftime('%m %d %Y', field) -> 01 01 2015., (*3)

Installation

To install this library, run the command below and you will get the latest version:, (*4)

composer require beberlei/doctrineextensions

If you want to run phpunit:, (*5)

composer run test

If you want to run php-cs-fixer:, (*6)

composer run lint

Usage

Symfony

If you are using DoctrineExtensions with Symfony read How to Register custom DQL Functions., (*7)

You can find example Symfony configuration for using DoctrineExtensions custom DQL functions in config., (*8)

Standalone

If you are using DoctrineExtensions standalone, you need to register the custom function in the ORM configuration. For more information check out the documentation of Doctrine DQL User Defined Functions., (*9)

Notes

  • MySQL DATE_ADD is available in DQL as DATEADD(CURRENT_DATE(), 1, 'DAY')
  • MySQL DATE_SUB is available in DQL as DATESUB(CURRENT_DATE(), 1, 'DAY')
  • MySQL IF is available in DQL as IFELSE(field > 0, 'true', 'false')

Troubleshooting

Issues are disabled on this repository, if a custom DQL function that you want isn't provided, or does not support the arguments you want to pass, pull requests are open and we would love to have your contributions., (*10)

The Versions

14/07 2018

dev-master

9999999-dev

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

14/07 2018

v1.1.3

1.1.3.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

06/07 2018

v1.1.2

1.1.2.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

05/07 2018

v1.1.1

1.1.1.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

05/07 2018

v1.1.0

1.1.0.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

05/07 2018

v1.0.24

1.0.24.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

28/05 2018

v1.0.23

1.0.23.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

28/05 2018

dev-doctrine-2.6

dev-doctrine-2.6

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

19/05 2018

v1.0.22

1.0.22.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

27/01 2018

v1.0.21

1.0.21.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

01/12 2017

v1.0.20

1.0.20.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

02/10 2017

v1.0.19

1.0.19.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

27/09 2017

v1.0.18

1.0.18.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

08/08 2017

dev-test-php-7.2

dev-test-php-7.2

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

16/06 2017

v1.0.17

1.0.17.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

18/05 2017

v1.0.16

1.0.16.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

27/03 2017

v1.0.15

1.0.15.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

16/03 2017

v1.0.14

1.0.14.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

11/01 2017

v1.0.13

1.0.13.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

06/12 2016

v1.0.12

1.0.12.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

06/07 2016

v1.0.11

1.0.11.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

04/07 2016

v1.0.10

1.0.10.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

24/03 2016

1.0.x-dev

1.0.9999999.9999999-dev

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

24/03 2016

v1.0.9

1.0.9.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

12/03 2016

v1.0.8

1.0.8.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

07/03 2016

v1.0.7

1.0.7.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

12/11 2015

v1.0.6

1.0.6.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

06/08 2015

v1.0.5

1.0.5.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

05/08 2015

v1.0.4

1.0.4.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

05/08 2015

v1.0.3

1.0.3.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

03/08 2015

v1.0.2

1.0.2.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

15/03 2015

v1.0.1

1.0.1.0

A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL and Oracle.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

15/03 2015

v1.0.0

1.0.0.0

Additional Doctrine 2 query functions

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.2

 

The Development Requires

by Benjamin Eberlei
by Steve Lacey

orm database doctrine

15/03 2015

0.3.x-dev

0.3.9999999.9999999-dev

  Sources   Download

The Requires

  • php >=5.3.2

 

The Development Requires

15/03 2015

v0.3.0

0.3.0.0

  Sources   Download

The Requires

  • php >=5.3.2

 

The Development Requires

20/12 2013

v0.2-alpha

0.2.0.0-alpha

  Sources   Download

The Requires

 

16/05 2012

v0.1

0.1.0.0

  Sources   Download

The Requires