swis/database-extra-bundle
Composer 安装命令:
composer require swis/database-extra-bundle
包简介
This bundle extends the behaviour of a SQLite database in a Symfony2 project.
README 文档
README
This bundle provides additional features for databases in any Symfony 2 project.
Core features
- Trigonometric and other additional functions for SQLite (ACOS, COS, RADIANS, SIN, SQRT, MOD, LOCATE)
- DQL definitions of trigonometric functions for their usage with Doctrine (ACOS, COS, RADIANS, SIN)
Instructions
- Include the bundle in your
composer.json
"require": {
...
"swis/database-extra-bundle": "dev-master",
...
}
- Enable it in your
AppKernel.php
$bundles = array(
...
new Swis\Bundle\DatabaseExtraBundle\SwisDatabaseExtraBundle(),
...
);
3a) For enabling the SQLite driver, edit your config.yml:
doctrine:
dbal:
connections:
default:
driver_class: \Swis\Bundle\DatabaseExtraBundle\Driver\Sqlite
3b) For enabling the DQL functions, edit your config.yml:
doctrine:
orm:
entity_managers:
default:
dql:
numeric_functions:
acos: Swis\Bundle\DatabaseExtraBundle\DQL\Acos
cos: Swis\Bundle\DatabaseExtraBundle\DQL\Cos
radians: Swis\Bundle\DatabaseExtraBundle\DQL\Radians
sin: Swis\Bundle\DatabaseExtraBundle\DQL\Sin
统计信息
- 总下载量: 32.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-07-27