update readme

This commit is contained in:
Joe Ardent 2023-07-27 14:13:42 -07:00
parent b799a9955f
commit 0db850102c
1 changed files with 13 additions and 2 deletions

View File

@ -63,8 +63,8 @@ are always fresh, it's not possible to easily guess a valid Julid if you already
The extension, when loaded into SQLite, provides the following functions:
* `julid_new()`: create a new Julid and return it as a `blob`
* `julid_seconds(julid)`: get the number milliseconds since the UNIX epoch that this julid was
created
* `julid_seconds(julid)`: get the number seconds (as a 64-bit float) since the UNIX epoch that this
julid was created
* `julid_counter(julid)`: show the value of this julid's monotonic counter
* `julid_sortable(julid)`: return the 64-bit concatenation of the timestamp and counter
* `julid_string(julid)`: show the [base-32 Crockford](https://en.wikipedia.org/wiki/Base32)
@ -113,3 +113,14 @@ will also include trait implementations for using Julids with
feature, `chrono`, uses the Chrono crate to return the timestamp as a
[`DateTime`](https://docs.rs/chrono/latest/chrono/struct.DateTime.html) by adding a `created_at()`
method to `Julid` instances.
# Thanks
This crate wouldn't have been possible without a lot of inspiration (and a little shameless
stealing) from the [ulid-rs](https://github.com/dylanhart/ulid-rs) crate, as well as the
[sqlite-loadable-rs](https://github.com/asg017/sqlite-loadable-rs) crate, which made it *extremely*
easy to write the SQLite extension. Thank you, authors of those crates! Feel free to steal from this
project! (though I did submit a [pull request](https://github.com/asg017/sqlite-loadable-rs/pull/13)
to the sqlite-loadable-rs project, to add an entrypoint macro that returns
[`SQLITE_OK_LOAD_PERMANENTLY`](https://www.sqlite.org/rescode.html#ok_load_permanently), which would
let me use that instead of manually implementing the entrypoint to return that)