Skip to content

fnando/sqlite-shortid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlite-shortid

Installation

  • Use sqlpkg to manage extensions.
  • Install it with sqlpkg fnando/sqlite-shortid.

To test if everything worked, run:

$ sqlite3 --cmd '.load .sqlpkg/fnando/sqlite-shortid/shortid' <<< 'select shortid();'
┌────────────┐
│ shortid()  │
├────────────┤
│ 9765TXUKG6 │
└────────────┘
Run Time: real 0.000 user 0.000020 sys 0.000049

Usage

.load .sqlpkg/fnando/sqlite-shortid/shortid
.mode line
.header on

select shortid_version(),
       shortid(),
       shortid("S"),
       shortid("W"),
       shortid("", 20),
       shortid("U", 20);

About

A SQLite extension to generate short ids like slack.com

Topics

Resources

License

Stars

Watchers

Forks