pub struct FunctionOptions { /* private fields */ }Implementations§
Source§impl FunctionOptions
impl FunctionOptions
pub const fn default() -> Self
Sourcepub const fn set_n_args(self, n_args: i32) -> Self
pub const fn set_n_args(self, n_args: i32) -> Self
Set the number of parameters accepted by this function. Multiple functions may be provided under the same name with different n_args values; the implementation will be chosen by SQLite based on the number of parameters at the call site. The value may also be -1, which means that the function accepts any number of parameters. Functions which take a specific number of parameters take precedence over functions which take any number.
§Panics
This function panics if n_args is outside the range -1..128. This limitation is imposed by SQLite.
Sourcepub const fn set_deterministic(self, val: bool) -> Self
pub const fn set_deterministic(self, val: bool) -> Self
Enable or disable the deterministic flag. This flag indicates that the function is pure. It must have no side effects and the value must be determined solely its the parameters.
The SQLite query planner is able to perform additional optimizations on deterministic functions, so use of this flag is recommended where possible.
Sourcepub const fn set_risk_level(self, level: RiskLevel) -> Self
pub const fn set_risk_level(self, level: RiskLevel) -> Self
Set the level of risk for this function. See the RiskLevel enum for details about what the individual options mean.
Requires SQLite 3.31.0. On earlier versions of SQLite, this function is a harmless no-op.
Trait Implementations§
Source§impl Clone for FunctionOptions
impl Clone for FunctionOptions
Source§fn clone(&self) -> FunctionOptions
fn clone(&self) -> FunctionOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more