2017 © Pedro Peláez
 

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

image

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.

  • Monday, June 8, 2015
  • by michael-bender
  • Repository
  • 2 Watchers
  • 11 Stars
  • 195 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

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., (*1)

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/)., (*2)

Installation and Usage

Add to composer require, (*3)

"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, (*4)

In config/doctrine.php add, (*5)

'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., (*6)

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., (*7)

The Versions

08/06 2015

dev-master

9999999-dev

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.

  Sources   Download

MIT

The Requires

 

by Michael Bender

mysql doctrine2

07/05 2015

v0.1.0

0.1.0.0

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.

  Sources   Download

MIT

The Requires

 

by Michael Bender

mysql doctrine2