Execute a cross-shard write SQL through the Control Plane. Uses a system identity (SECURITY DEFINER) since the trigger body is database-defined code, not user-submitted queries.
(&self, request: &CrossShardWriteRequest)
| 180 | /// Uses a system identity (SECURITY DEFINER) since the trigger body |
| 181 | /// is database-defined code, not user-submitted queries. |
| 182 | async fn execute_sql(&self, request: &CrossShardWriteRequest) -> crate::Result<()> { |
| 183 | let identity = cross_shard_identity(TenantId::new(request.tenant_id)); |
| 184 | |
| 185 | // Dispatch through the normal Control Plane query path. |
| 186 | // The Control Plane handles parsing, planning, and Data Plane dispatch. |
| 187 | crate::control::trigger::fire::fire_sql( |
| 188 | &self.shared_state, |
| 189 | &identity, |
| 190 | TenantId::new(request.tenant_id), |
| 191 | &request.sql, |
| 192 | request.cascade_depth.saturating_add(1), |
| 193 | ) |
| 194 | .await |
| 195 | } |
| 196 | |
| 197 | /// Build a serialized VShardEnvelope response. |
| 198 | fn build_response( |
no test coverage detected