MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / handle_sql

Function handle_sql

src/environmentd/src/http/sql.rs:266–279  ·  view source on GitHub ↗
(
    mut client: AuthedClient,
    Json(request): Json<SqlRequest>,
)

Source from the content-addressed store, hash-verified

264}
265
266pub async fn handle_sql(
267 mut client: AuthedClient,
268 Json(request): Json<SqlRequest>,
269) -> impl IntoResponse {
270 let mut res = SqlResponse {
271 results: Vec::new(),
272 };
273 // Don't need to worry about timeouts or resetting cancel here because there is always exactly 1
274 // request.
275 match execute_request(&mut client, request, &mut res).await {
276 Ok(()) => Ok(Json(res)),
277 Err(e) => Err((StatusCode::BAD_REQUEST, e.to_string())),
278 }
279}
280
281#[derive(Debug)]
282pub enum ExistingUser {

Callers

nothing calls this directly

Calls 2

execute_requestFunction · 0.85
to_stringMethod · 0.45

Tested by

no test coverage detected