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

Function write_repr_pq_early

prqlc/prqlc/src/debug/render_html.rs:315–323  ·  view source on GitHub ↗
(w: &mut W, ast: &[pq_ast::SqlTransform])

Source from the content-addressed store, hash-verified

313}
314
315fn write_repr_pq_early<W: Write>(w: &mut W, ast: &[pq_ast::SqlTransform]) -> Result {
316 writeln!(w, r#"<div class="pq repr">"#)?;
317
318 let json = serde_json::to_string(ast).unwrap();
319 let json_node: serde_json::Value = serde_json::from_str(&json).unwrap();
320 write_json_ast_node(w, json_node, false)?;
321
322 writeln!(w, "</div>")
323}
324
325fn write_repr_pq<W: Write>(w: &mut W, ast: &pq_ast::SqlQuery) -> Result {
326 writeln!(w, r#"<div class="pq repr">"#)?;

Callers 1

write_titled_entryFunction · 0.85

Calls 1

write_json_ast_nodeFunction · 0.85

Tested by

no test coverage detected