Giter VIP home page Giter VIP logo

doctrineextensions's Introduction

DoctrineExtensions

Build Status Build Status Build Status Travis branch Build Status Travis branch

Packagist Packagist Packagist Packagist Packagist

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

DB Functions
MySQL ACOS, ASCII, ASIN, ATAN, ATAN2, BINARY, BIT_COUNT, BIT_XOR, CEIL, CHAR_LENGTH, CONCAT_WS, CONVERT_TZ, COS, COT, COUNTIF, CRC32, DATE, DATE_FORMAT, DATEADD, DATEDIFF, DATESUB, DAY, DAYNAME, DAYOFWEEK, DAYOFYEAR, DEGREES, DIV, FIELD, FIND_IN_SET, FLOOR, FROM_UNIXTIME, GREATEST, GROUP_CONCAT, HEX, HOUR, IFELSE, IFNULL, LAST_DAY, LEAST, LPAD, MATCH_AGAINST, MD5, MINUTE, MONTH, MONTHNAME, NOW, NULLIF, PI, POWER, QUARTER, RADIANS, RAND, REGEXP, REPLACE, ROUND, RPAD, SECOND, SHA1, SHA2, SIN, SOUNDEX, STD, STDDEV, STRTODATE, SUBSTRING_INDEX, TAN, TIME, TIMEDIFF, TIMESTAMPADD, TIMESTAMPDIFF, TIMETOSEC, UNHEX, UNIX_TIMESTAMP, UUID_SHORT, WEEK, WEEKDAY, YEAR, YEARWEEK
Oracle DAY, MONTH, NVL, TODATE, TRUNC, YEAR, LISTAGG
Sqlite DATE, MINUTE, HOUR, DAY, WEEK, WEEKDAY, MONTH, YEAR, STRFTIME, DATE_FORMAT*, IFNULL, REPLACE, ROUND
PostgreSQL TO_DATE, TO_CHAR, AT_TIME_ZONE, COUNT_FILTER

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.

Installation

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

composer require beberlei/DoctrineExtensions

If you want to run the tests:

vendor/bin/phpunit

To include the DoctrineExtensions you should fire up an autoloader, for example:

<?php

$classLoader = new \Doctrine\Common\ClassLoader('DoctrineExtensions', '/path/to/extensions');
$classLoader->register();

You can find an example configuration for using the additional MySQL functions in Symfony2 in config/mysql.yml.

Legacy versions

If you're still using Paginator, LargeCollections, Phing, PHPUnit or Versionable behaviours available in 0.1โ€“0.3, you're welcome to use 0.3 โ€“ but do note, this functionality is now available in Doctrine core, no longer supported in this library, and was removed in 1.0.

Whilst pull requests for bugfixes to this functionality will be considered for 0.x releases, you are encouraged to switch out your implementations and upgrade to ~1.0.

doctrineextensions's People

Contributors

andrewmackrodt avatar beberlei avatar benmorel avatar federicojasson avatar flashblack avatar gallien avatar guilhermeblanco avatar guiwoda avatar gws avatar hobodave avatar lstrojny avatar manish-tal avatar mitmaro avatar nimasdj avatar nnmer avatar ponchorage avatar restless-et avatar sandermarechal avatar shibby avatar silvioq avatar simukti avatar sketchthat avatar stekycz avatar stevelacey avatar sydney-o9 avatar tarjei avatar tombevers avatar webcraft avatar winkbrace avatar zeineddin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.