Check if the query needs any processing
(&self, schema_cache: &SchemaCache)
| 81 | |
| 82 | /// Check if the query needs any processing |
| 83 | pub fn needs_processing(&self, schema_cache: &SchemaCache) -> bool { |
| 84 | if self.needs_cast_translation { |
| 85 | return true; |
| 86 | } |
| 87 | |
| 88 | if self.needs_regex_translation { |
| 89 | return true; |
| 90 | } |
| 91 | |
| 92 | if self.needs_schema_translation { |
| 93 | return true; |
| 94 | } |
| 95 | |
| 96 | if self.needs_numeric_cast_translation { |
| 97 | return true; |
| 98 | } |
| 99 | |
| 100 | if self.needs_array_translation { |
| 101 | return true; |
| 102 | } |
| 103 | |
| 104 | if self.needs_delete_using_translation { |
| 105 | return true; |
| 106 | } |
| 107 | |
| 108 | if self.needs_batch_update_translation { |
| 109 | return true; |
| 110 | } |
| 111 | |
| 112 | if self.needs_datetime_translation { |
| 113 | return true; |
| 114 | } |
| 115 | |
| 116 | if self.needs_pg_table_is_visible_translation { |
| 117 | return true; |
| 118 | } |
| 119 | |
| 120 | if self.needs_session_identifier_translation { |
| 121 | return true; |
| 122 | } |
| 123 | |
| 124 | // Check decimal rewrite need if not already determined |
| 125 | if let Some(needs_decimal) = self.needs_decimal_rewrite { |
| 126 | return needs_decimal; |
| 127 | } |
| 128 | |
| 129 | // For INSERT queries, check if table has decimal columns |
| 130 | if matches!(QueryTypeDetector::detect_query_type(self.original_query), QueryType::Insert) |
| 131 | && let Some(table_name) = extract_insert_table_name(self.original_query) { |
| 132 | return schema_cache.has_decimal_columns(&table_name); |
| 133 | } |
| 134 | |
| 135 | // For SELECT queries, always assume decimal rewrite might be needed |
| 136 | // This is conservative but safe |
| 137 | matches!( |
| 138 | QueryTypeDetector::detect_query_type(self.original_query), |
| 139 | QueryType::Select |
| 140 | ) |
nothing calls this directly
no test coverage detected