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

Function compile

prqlc/prqlc/src/cli/mod.rs:723–758  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

721
722 #[test]
723 fn compile() {
724 let result = Command::execute(
725 &Command::Compile {
726 io_args: IoArgs::default(),
727 signature_comment: false,
728 format: true,
729 target: "sql.any".to_string(),
730 debug_log: None,
731 },
732 &mut SourceTree::new(
733 [
734 ("Project.prql".into(), "orders.x | select y".to_string()),
735 (
736 "orders.prql".into(),
737 "let x = (from z | select {y, u})".to_string(),
738 ),
739 ],
740 None,
741 ),
742 "main",
743 )
744 .unwrap();
745 assert_snapshot!(String::from_utf8(result).unwrap().trim(), @"
746 WITH x AS (
747 SELECT
748 y,
749 u
750 FROM
751 z
752 )
753 SELECT
754 y
755 FROM
756 x
757 ");
758 }
759
760 #[test]
761 fn parse() {

Callers 1

compile_pathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected