MCPcopy Create free account
hub / github.com/PRQL/prql / write_repr_sql_parser

Function write_repr_sql_parser

prqlc/prqlc/src/debug/render_html.rs:335–343  ·  view source on GitHub ↗
(w: &mut W, ast: &sqlparser::ast::Query)

Source from the content-addressed store, hash-verified

333}
334
335fn write_repr_sql_parser<W: Write>(w: &mut W, ast: &sqlparser::ast::Query) -> Result {
336 writeln!(w, r#"<div class="sql-parser repr">"#)?;
337
338 let json = serde_json::to_string(ast).unwrap();
339 let json_node: serde_json::Value = serde_json::from_str(&json).unwrap();
340 write_json_ast_node(w, json_node, false)?;
341
342 writeln!(w, "</div>")
343}
344
345fn write_repr_sql<W: Write>(w: &mut W, query: &str) -> Result {
346 writeln!(w, r#"<div class="sql repr">"#)?;

Callers 1

write_titled_entryFunction · 0.85

Calls 1

write_json_ast_nodeFunction · 0.85

Tested by

no test coverage detected