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

Method wrap_in_parenthesis

prqlc/prqlc/src/sql/gen_expr.rs:1161–1175  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1159 }
1160
1161 fn wrap_in_parenthesis(self) -> Self {
1162 match self {
1163 ExprOrSource::Expr(expr) => ExprOrSource::Expr(Box::new(sql_ast::Expr::Nested(expr))),
1164 ExprOrSource::Source(SourceExpr {
1165 text, window_frame, ..
1166 }) => {
1167 let text = format!("({text})");
1168 ExprOrSource::Source(SourceExpr {
1169 text,
1170 binding_strength: 100,
1171 window_frame,
1172 })
1173 }
1174 }
1175 }
1176}
1177
1178impl SQLExpression for ExprOrSource {

Callers 1

translate_operandFunction · 0.80

Calls 1

ExprClass · 0.50

Tested by

no test coverage detected