MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / is_session_show

Function is_session_show

nodedb/src/control/server/native/dispatch/sql.rs:334–354  ·  view source on GitHub ↗
(upper: &str)

Source from the content-addressed store, hash-verified

332}
333
334fn is_session_show(upper: &str) -> bool {
335 !upper.starts_with("SHOW USERS")
336 && !upper.starts_with("SHOW TENANTS")
337 && !upper.starts_with("SHOW TENANT ")
338 && !upper.starts_with("SHOW SESSION")
339 && !upper.starts_with("SHOW CLUSTER")
340 && !upper.starts_with("SHOW RAFT")
341 && !upper.starts_with("SHOW MIGRATIONS")
342 && !upper.starts_with("SHOW PEER")
343 && !upper.starts_with("SHOW NODES")
344 && !upper.starts_with("SHOW NODE ")
345 && !upper.starts_with("SHOW RANGES")
346 && !upper.starts_with("SHOW ROUTING")
347 && !upper.starts_with("SHOW SCHEMA VERSION")
348 && !upper.starts_with("SHOW COLLECTIONS")
349 && !upper.starts_with("SHOW AUDIT")
350 && !upper.starts_with("SHOW PERMISSIONS")
351 && !upper.starts_with("SHOW GRANTS")
352 && upper != "SHOW CONNECTIONS"
353 && !upper.starts_with("SHOW INDEXES")
354}
355
356fn handle_show_sql(ctx: &DispatchCtx<'_>, seq: u64, sql: &str) -> NativeResponse {
357 let param = sql[5..].trim().to_lowercase();

Callers 1

handle_sqlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected