ordereduuid

package module
v0.0.0-...-0db3a48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2016 License: MIT Imports: 5 Imported by: 0

README

OrderedUUID

Package ordereduuid is a SQL type converter from String to Binary by way of reordering the the most significant digits first as inspired by https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/

Documentation

Overview

Package ordereduuid is a SQL type converter from String to Binary by way of reordering the the most significant digits first as inspired by https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UUID

func UUID() string

UUID exports underlying pborman/uuid package

Types

type OrderedUUID

type OrderedUUID struct {
	UUID  string
	Valid bool
}

OrderedUUID is the SQL type that is convertable from binary/bytes to string

func New

func New() *OrderedUUID

New returns a valid OrderedUUID

func Parse

func Parse(u string) *OrderedUUID

Parse returns a validated OrderedUUID

func (*OrderedUUID) Scan

func (o *OrderedUUID) Scan(value interface{}) error

Scan implements the Scanner interface.

func (*OrderedUUID) String

func (o *OrderedUUID) String() string

String returns the UUID value

func (*OrderedUUID) Value

func (o *OrderedUUID) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL