Skip to content

lrf141/mysql-ulid-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql-ulid-plugin

MySQL UDF Plugin for generating ULIDs

How to build

Install mysql_config

For Ubuntu.

$ sudo apt install libmysqlclient-dev

For macOS with homebrew

$ brew install mysql-connector-c

Build

$ mkdir build && cd $_
$ cmake ../
$ make

Run test

$ mysql build && cd $_
$ cmake ../
$ make test

or

$ mysql build && cd $_
$ cmake ../
$ ./ulid-gtest

Use ULID()

CREATE FUNCTION ulid RETURNS STRING SONAME 'ulid.so';
SELECT ULID();

Warning: If mysql client run with --binary-as-hex=1, Return string is represent as hex.

About

MySQL UDF Plugin for generating ULIDs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages