add innocuous flag to all sqlite functions

This commit is contained in:
Joe Ardent 2024-04-09 14:54:11 -07:00
parent 705afc19e9
commit a54d704300
3 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "julid-rs"
version = "1.6.1803398"
version = "1.6.18033988"
authors = ["Joe Ardent <code@ardent.nebcorp.com>"]
edition = "2021"
keywords = ["ulid", "library", "sqlite", "extension", "julid"]

View file

@ -1 +1 @@
1.61803398
1.618033988

View file

@ -47,12 +47,18 @@ pub mod sqlite_plugin {
use super::*;
pub(super) fn init_rs(db: *mut sqlite3) -> Result<()> {
let flags = FunctionFlags::UTF8 | FunctionFlags::DETERMINISTIC;
let flags = FunctionFlags::UTF8 | FunctionFlags::DETERMINISTIC | FunctionFlags::INNOCUOUS;
define_scalar_function(db, "julid_new", 0, julid_new, FunctionFlags::INNOCUOUS)?;
define_scalar_function(db, "julid_seconds", 1, julid_seconds, flags)?;
define_scalar_function(db, "julid_counter", 1, julid_counter, flags)?;
define_scalar_function(db, "julid_sortable", 1, julid_sortable, flags)?;
define_scalar_function(db, "julid_string", -1, julid_string, FunctionFlags::UTF8)?;
define_scalar_function(
db,
"julid_string",
-1,
julid_string,
FunctionFlags::UTF8 | FunctionFlags::INNOCUOUS,
)?;
Ok(())
}