Skip to main content

sqlite_safety_level

Function sqlite_safety_level 

Source
pub fn sqlite_safety_level(text: &str, omit_full: bool, default: u8) -> u8
Expand description

Reads a setting the way SQLite’s getSafetyLevel does.

A number is read as a number, so PRAGMA synchronous = 5 reads back 5. on, yes and true are 1; off, no and false are 0; full is 2 and extra is 3 unless omit_full is set, which a plain boolean pragma sets. Any other word is default, and so is a negative number, because a sign is not a digit.

@param text - the argument’s text @param omit_full - whether full and extra are refused as words @param default - what any other text means