gesdinet/doctrine-functions-psql 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gesdinet/doctrine-functions-psql

最新稳定版本:v0.1.0

Composer 安装命令:

composer require gesdinet/doctrine-functions-psql

包简介

Doctrine DQL Functions for PostgreSQL

README 文档

README

This package contains doctrine functions for PostgreSQL.

List of available functions:

  • 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.

Install

Via Composer

$ composer require gesdinet/doctrine-functions-psql

Usage

1) Doctrine Only

According to the Doctrine documentation you can register the functions in this package this way.

<?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.

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

Credits

Based on luxifer doctrine-functions for MySQL

License

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

统计信息

  • 总下载量: 29.91k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固