Skip to content

naprstek/doctrine-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DoctrineFunctions

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

This library is inspired by DoctrineExpressions, see here: [https://github.com/beberlei/DoctrineExtensions]. It contains a lot of functions for other DB.

The namespace were preserved as they are in DoctrineExtensions, so those two library can be used together.

DB Functions
MSSQL CAST, FORMAT, ISNULL, GETDATE, MONTH, YEAR, DATEPART

Installation

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

composer require naprstek/doctrine-functions

Integration to application

in module.config.php add to doctrine section and name function you need. Functions are not added automaticaly (to decrease dependencies and speed up):

    'doctrine' => [
        'connection' => [
            'orm_default' => [
                ...
            ],
        ],
        'configuration' => [
            'orm_default' => [ //User Defined Functions
                'string_functions' => [
                    'format' => 'DoctrineFunctions\Query\Mssql\Format',
                    ...
                ],
                'datetime_functions' => [], //when they exist
                'numeric_functions' => [], //when they exist
            ],
        ],
    ],

About

User Defined Functions MSSQL for Doctrine2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages