Skip to content

tehlordvortex/typeid-sqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

typeid-sqlite

An SQLite extension that wraps the Go TypeID implementation, exposing two methods: typeid_generate_text and typeid_check_text.

Compiling

You should compile this extension with the same toolchain you use for SQLite (or LibSQL) itself. Building this as a shared library is straightforward with Go 1.24.4+ and a build toolchain installed:

go build -buildmode=c-shared -o dist/typeid.so

API

typeid_generate_text(prefix)

Generates a TypeID string with the given prefix. This will fail if prefix isn't a valid TypeID prefix

typeid_check_text(prefix, value)

Returns 1 if the given value is a valid TypeID with the given prefix. Returns 0 in all other cases.

Caveats

  • 3.3MB binary to expose 2 functions. ¯_(ツ)_/¯

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages