Enum ForeignKeys
pub enum ForeignKeys {
Enforced,
Unenforced,
}Expand description
Whether SQLite enforces declared foreign keys on one connection.
Always written explicitly by the openers that take it, in both directions — the posture must not depend on how the SQLite in use was compiled (this workspace’s vendored build defaults ON, a stock build defaults OFF).
Variants§
Enforced
PRAGMA foreign_keys = ON — the origin posture. A write that would leave a
dangling reference fails, and declared ON DELETE/ON UPDATE actions run.
The default, matching the vendored build’s compile-time default: a connection that has not thought about this gets the strict answer.
Unenforced
PRAGMA foreign_keys = OFF — the apply posture, for a connection that
replays row effects an upstream authority already validated (and whose cascades
it already ran, and shipped). See the module docs for why this is correctness,
not a relaxation.
Implementations§
§impl ForeignKeys
impl ForeignKeys
pub fn is_enforced(self) -> bool
pub fn is_enforced(self) -> bool
True when SQLite should refuse violating writes on this connection.
Trait Implementations§
§impl Clone for ForeignKeys
impl Clone for ForeignKeys
§fn clone(&self) -> ForeignKeys
fn clone(&self) -> ForeignKeys
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ForeignKeys
impl Debug for ForeignKeys
§impl Default for ForeignKeys
impl Default for ForeignKeys
§fn default() -> ForeignKeys
fn default() -> ForeignKeys
§impl PartialEq for ForeignKeys
impl PartialEq for ForeignKeys
impl Copy for ForeignKeys
impl Eq for ForeignKeys
impl StructuralPartialEq for ForeignKeys
Auto Trait Implementations§
impl Freeze for ForeignKeys
impl RefUnwindSafe for ForeignKeys
impl Send for ForeignKeys
impl Sync for ForeignKeys
impl Unpin for ForeignKeys
impl UnsafeUnpin for ForeignKeys
impl UnwindSafe for ForeignKeys
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.