pub struct Validator { /* private fields */ }Expand description
Validates query elements against known schema and provides suggestions.
Implementations§
Source§impl Validator
impl Validator
Sourcepub fn table_names(&self) -> &[String]
pub fn table_names(&self) -> &[String]
Get list of all table names (for autocomplete).
Sourcepub fn column_names(&self, table: &str) -> Option<&Vec<String>>
pub fn column_names(&self, table: &str) -> Option<&Vec<String>>
Get column names for a table (for autocomplete).
Sourcepub fn validate_table(&self, table: &str) -> Result<(), String>
pub fn validate_table(&self, table: &str) -> Result<(), String>
Check if a table exists. If not, returns suggested names.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Validator
impl RefUnwindSafe for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl UnwindSafe for Validator
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