承接 mbbender/doctrine-ordered-uuid-generator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mbbender/doctrine-ordered-uuid-generator

最新稳定版本:v0.1.0

Composer 安装命令:

composer require mbbender/doctrine-ordered-uuid-generator

包简介

Adds an Ordered UUID type for MySQL which replaces the CHAR(36) with a re-arranged UUID() string as a BINARY 16 which significantly increases performance.

README 文档

README

This library is under development and has not been tested with anything other than the most basic creating of an entity. Relationships have not been tested. Hydration has not been tested. Performance has not been tested.

The purpose of this Doctrine2 Id generator is to increase performance when using a UUID for entities. It creates an ordered UUID based on the methods described in Karthik Appigatla's article (http://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/).

#Installation and Usage

Add to composer require

"mbbender/doctrine-ordered-uuid-generator":"dev-master"

##Register Type with Entity Manager

Doctrine\DBAL\Types\Type::addType('ordered_guid','Mbbender\Doctrine\DBAL\Types\OrderedGuidType');

###In Laravel Install https://github.com/atrauzzi/laravel-doctrine

In config/doctrine.php add

'custom_type' => [
  `'ordered_guid' => 'Mbbender\Doctrine\DBAL\Types\OrderedGuidType'`
]

##Implement In Entity

 /**
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="CUSTOM")
 * @ORM\Column(type="ordered_guid")
 * @ORM\CustomIdGenerator(class="Mbbender\Doctrine\ORM\Id\OrderedGuidGenerator")
 */
private $id;

#Notes Basic testing done with MySQL and Sqlite.

#Contributions If you'd like to add a database system you just have to add a strategy for generating the UUID in the form stated in the linked article above for your database system in the OrderedGuidTYpe file.

统计信息

  • 总下载量: 220
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-01