pub struct SemanticValidator {
pub context: ValidationContext,
pub errors: Vec<String>,
}Expand description
Visitor that validates semantic correctness of CQL statements
Fields§
§context: ValidationContext§errors: Vec<String>Implementations§
Source§impl SemanticValidator
impl SemanticValidator
Sourcepub fn new(context: ValidationContext) -> Self
pub fn new(context: ValidationContext) -> Self
Create a new semantic validator with the given context
Sourcepub fn get_errors(&self) -> &[String]
pub fn get_errors(&self) -> &[String]
Get all validation errors
Trait Implementations§
Source§impl CqlVisitor<()> for SemanticValidator
impl CqlVisitor<()> for SemanticValidator
fn visit_statement(&mut self, statement: &CqlStatement) -> Result<()>
fn visit_select(&mut self, select: &CqlSelect) -> Result<()>
fn visit_insert(&mut self, insert: &CqlInsert) -> Result<()>
fn visit_update(&mut self, update: &CqlUpdate) -> Result<()>
fn visit_delete(&mut self, delete: &CqlDelete) -> Result<()>
fn visit_create_table(&mut self, create: &CqlCreateTable) -> Result<()>
fn visit_drop_table(&mut self, drop: &CqlDropTable) -> Result<()>
fn visit_create_index(&mut self, create: &CqlCreateIndex) -> Result<()>
fn visit_alter_table(&mut self, alter: &CqlAlterTable) -> Result<()>
fn visit_data_type(&mut self, data_type: &CqlDataType) -> Result<()>
fn visit_expression(&mut self, expression: &CqlExpression) -> Result<()>
fn visit_identifier(&mut self, _identifier: &CqlIdentifier) -> Result<()>
fn visit_literal(&mut self, literal: &CqlLiteral) -> Result<()>
Auto Trait Implementations§
impl Freeze for SemanticValidator
impl RefUnwindSafe for SemanticValidator
impl Send for SemanticValidator
impl Sync for SemanticValidator
impl Unpin for SemanticValidator
impl UnsafeUnpin for SemanticValidator
impl UnwindSafe for SemanticValidator
Blanket Implementations§
impl<T> Allocation for T
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