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

Method write_output

prqlc/prqlc/src/cli/mod.rs:535–552  ·  view source on GitHub ↗
(&mut self, data: &[u8])

Source from the content-addressed store, hash-verified

533 }
534
535 fn write_output(&mut self, data: &[u8]) -> std::io::Result<()> {
536 use Command::{Collect, Compile, Debug, Experimental, Lex, Parse};
537 let mut output = match self {
538 Parse { io_args, .. }
539 | Lex { io_args, .. }
540 | Collect(io_args)
541 | Compile { io_args, .. }
542 | Debug(DebugCommand::Annotate(io_args) | DebugCommand::Lineage { io_args, .. }) => {
543 io_args.output.clone()
544 }
545 Experimental(ExperimentalCommand::GenerateDocs { io_args, .. }) => {
546 io_args.output.clone()
547 }
548 Experimental(ExperimentalCommand::Highlight(io_args)) => io_args.output.clone(),
549 _ => unreachable!(),
550 };
551 output.write_all(data)
552 }
553}
554
555fn has_debug_log(cli: &Cli) -> bool {

Callers 1

run_io_commandMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected