2017 © Pedro PelĂĄez
 

silverstripe-module silverstripe-uuid

Uuid data extension for SilverStripe

image

lekoala/silverstripe-uuid

Uuid data extension for SilverStripe

  • Monday, July 16, 2018
  • by lekoala
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

SilverStripe Uuid module

Build Status Build Status Scrutinizer Code Quality Code Coverage Build Status codecov.io, (*1)

Latest Stable Version Latest Unstable Version Total Downloads License Monthly Downloads Daily Downloads, (*2)

Easily add uuid to your DataObjects, (*3)

Getting started

Simply add the extension to your DataObject, (*4)

MyDataObject:
  extensions:
    - LeKoala\Uuid\UuidExtension

Call UuidExtension::getByUuid(MyDataObject::class, $uuid) to retrieve the record by Uuid. Since that's really ugly, you can also use the HasUuid trait on your classes to return a properly type hinted class., (*5)

Usage in templates

In your templates, use UuidSegment to ensure Uuid value is generated on the record. UuidSegment are base62 encoded in order to be shorter and more readable., (*6)

Getting readable values

Since Uuid's are stored in binary format for performance reason, you need to call $myObject->dbObject('Uuid')->Nice() to get a readable value., (*7)

Upgrade to Ramsey v4

If you happen to upgrade from previous versions you might want to check this guide, (*8)

TODO

  • Postgres compat

Worth reading

Storing UUID Values in MySQL GUID/UUID Performance Laravel: The mysterious “Ordered UUID”: offer a good overview of the situation although it's a bit laravel specific, (*9)

Compatibility

Tested with 4.4 and up, (*10)

Maintainer

LeKoala - thomas@lekoala.be, (*11)

The Versions

16/07 2018

dev-master

9999999-dev

Uuid data extension for SilverStripe

  Sources   Download

MIT

The Requires

 

by Avatar lekoala

uuid module silverstripe

08/03 2018

1.x-dev

1.9999999.9999999.9999999-dev

Uuid data extension for SilverStripe

  Sources   Download

MIT

The Requires

 

by Avatar lekoala

uuid module silverstripe