pub struct SQLFunctionOptions {
pub volatility: FunctionVolatility,
pub may_mutate_engine: bool,
}Expand description
Execution properties declared for a Rust-backed SQL callback.
The default is deliberately conservative: callbacks registered through the original two-argument APIs are volatile and may mutate engine state. Callers must opt in to read-only execution explicitly.
Fields§
§volatility: FunctionVolatilityWhether optimizer rewrites may duplicate, eliminate, or reorder calls.
may_mutate_engine: boolWhether invoking the callback can mutate engine or session state.
Implementations§
Source§impl SQLFunctionOptions
impl SQLFunctionOptions
pub const fn new( volatility: FunctionVolatility, may_mutate_engine: bool, ) -> SQLFunctionOptions
Sourcepub const fn read_only(volatility: FunctionVolatility) -> SQLFunctionOptions
pub const fn read_only(volatility: FunctionVolatility) -> SQLFunctionOptions
Declare a callback that cannot mutate engine state.
Trait Implementations§
Source§impl Clone for SQLFunctionOptions
impl Clone for SQLFunctionOptions
Source§fn clone(&self) -> SQLFunctionOptions
fn clone(&self) -> SQLFunctionOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SQLFunctionOptions
Source§impl Debug for SQLFunctionOptions
impl Debug for SQLFunctionOptions
Source§impl Default for SQLFunctionOptions
impl Default for SQLFunctionOptions
Source§fn default() -> SQLFunctionOptions
fn default() -> SQLFunctionOptions
Returns the “default value” for a type. Read more
impl Eq for SQLFunctionOptions
Source§impl PartialEq for SQLFunctionOptions
impl PartialEq for SQLFunctionOptions
impl StructuralPartialEq for SQLFunctionOptions
Auto Trait Implementations§
impl Freeze for SQLFunctionOptions
impl RefUnwindSafe for SQLFunctionOptions
impl Send for SQLFunctionOptions
impl Sync for SQLFunctionOptions
impl Unpin for SQLFunctionOptions
impl UnsafeUnpin for SQLFunctionOptions
impl UnwindSafe for SQLFunctionOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more