add innocuous flag to all sqlite functions
This commit is contained in:
parent
705afc19e9
commit
a54d704300
3 changed files with 10 additions and 4 deletions
|
@ -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"]
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.61803398
|
||||
1.618033988
|
||||
|
|
10
src/lib.rs
10
src/lib.rs
|
@ -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(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue