sequentialguid

package module
v0.0.0-...-da1e309 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 6 Imported by: 0

README

sequential-guid

A time ordered uuid created essentially for database unique keys

By RFC 4122, the standard GUID is 16 bytes, the first 6 bytes is generated from UTC timestamp and the next 10 bytes are generated randomly,the Endianess are the computer architecture are also considered Follow up article link: https://www.codeproject.com/Articles/388157/GUIDs-as-fast-primary-keys-under-multiple-database.Golang implementation of code written in C#

Usage

Cd to the root folder and run the main.go file in command line

Documentation

Index

Constants

View Source
const INT_SIZE int = int(unsafe.Sizeof(0))

Variables

This section is empty.

Functions

func NewSequentialGuid

func NewSequentialGuid() uuid.UUID

New creates a sequential guid that can be used as the primary key to solve the randomness of Globally Unique Identifier (GUID or UUID). By RFC 4122, the standard GUID is 16 bytes, the first 6 bytes is generated from UTC timestamp and the next 10 bytes are generated randomly, the Endianess are the computer architecture are also considered

Follow up article link: https://www.codeproject.com/Articles/388157/GUIDs-as-fast-primary-keys-under-multiple-database. Golang implementation of code written in C#

Types

This section is empty.

Jump to

Keyboard shortcuts

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