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

Function select_of

nodedb-sql/src/planner/window/extract.rs:194–202  ·  view source on GitHub ↗
(sql: &str)

Source from the content-addressed store, hash-verified

192 use crate::parser::statement::parse_sql;
193
194 fn select_of(sql: &str) -> Box<ast::Select> {
195 match parse_sql(sql).unwrap().into_iter().next().unwrap() {
196 ast::Statement::Query(q) => match *q.body {
197 ast::SetExpr::Select(s) => s,
198 _ => panic!("not a SELECT"),
199 },
200 _ => panic!("not a query"),
201 }
202 }
203
204 #[test]
205 fn named_window_referenced_by_multiple_functions() {

Calls 2

parse_sqlFunction · 0.50
nextMethod · 0.45