(
&self,
statement: &Statement,
analysis: &mut SqlAnalysisResult,
depth: usize,
original_query: &str
)
| 353 | } |
| 354 | |
| 355 | fn analyze_dml_statement( |
| 356 | &self, |
| 357 | statement: &Statement, |
| 358 | analysis: &mut SqlAnalysisResult, |
| 359 | depth: usize, |
| 360 | original_query: &str |
| 361 | ) -> Result<(), PgSqliteError> { |
| 362 | // For INSERT, UPDATE, DELETE statements, analyze the WHERE clauses and subqueries |
| 363 | match statement { |
| 364 | Statement::Update { selection, .. } => { |
| 365 | if let Some(where_clause) = selection { |
| 366 | self.analyze_expression(where_clause, analysis, depth, original_query)?; |
| 367 | } |
| 368 | } |
| 369 | Statement::Delete(delete_stmt) => { |
| 370 | if let Some(where_clause) = &delete_stmt.selection { |
| 371 | self.analyze_expression(where_clause, analysis, depth, original_query)?; |
| 372 | } |
| 373 | } |
| 374 | Statement::Insert(insert_stmt) => { |
| 375 | if let Some(source) = &insert_stmt.source { |
| 376 | self.analyze_query_statement(source, analysis, depth, original_query)?; |
| 377 | } |
| 378 | } |
| 379 | _ => {} |
| 380 | } |
| 381 | Ok(()) |
| 382 | } |
| 383 | |
| 384 | fn is_tautology(&self, left: &Expr, op: &sqlparser::ast::BinaryOperator, right: &Expr) -> bool { |
| 385 | use sqlparser::ast::BinaryOperator; |
no test coverage detected