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

Function std

prqlc/prqlc/src/sql/operators.rs:16–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14use crate::{Error, WithErrorInfo};
15
16fn std() -> &'static decl::Module {
17 static STD: OnceLock<decl::Module> = OnceLock::new();
18 STD.get_or_init(|| {
19 let _suppressed = debug::log_suppress();
20
21 let std_lib = crate::SourceTree::new(
22 [(
23 PathBuf::from("std.prql"),
24 include_str!("./std.sql.prql").to_string(),
25 )],
26 None,
27 );
28 let ast = crate::parser::parse(&std_lib).unwrap();
29 let context = semantic::resolve(ast).unwrap();
30
31 context.module
32 })
33}
34
35pub(super) fn translate_operator_expr(expr: rq::Expr, ctx: &mut Context) -> Result<ExprOrSource> {
36 let (name, args) = expr.kind.into_operator().unwrap();

Callers 1

find_operator_implFunction · 0.85

Calls 3

log_suppressFunction · 0.85
resolveFunction · 0.85
parseFunction · 0.50

Tested by

no test coverage detected