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

Function write_repr_pq

prqlc/prqlc/src/debug/render_html.rs:325–333  ·  view source on GitHub ↗
(w: &mut W, ast: &pq_ast::SqlQuery)

Source from the content-addressed store, hash-verified

323}
324
325fn write_repr_pq<W: Write>(w: &mut W, ast: &pq_ast::SqlQuery) -> Result {
326 writeln!(w, r#"<div class="pq repr">"#)?;
327
328 let json = serde_json::to_string(ast).unwrap();
329 let json_node: serde_json::Value = serde_json::from_str(&json).unwrap();
330 write_json_ast_node(w, json_node, false)?;
331
332 writeln!(w, "</div>")
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">"#)?;

Callers 1

write_titled_entryFunction · 0.85

Calls 1

write_json_ast_nodeFunction · 0.85

Tested by

no test coverage detected