(
scx: &StatementContext,
expr: &Expr<Aug>,
target_ty: &SqlScalarType,
)
| 1249 | } |
| 1250 | |
| 1251 | pub fn plan_default_expr( |
| 1252 | scx: &StatementContext, |
| 1253 | expr: &Expr<Aug>, |
| 1254 | target_ty: &SqlScalarType, |
| 1255 | ) -> Result<HirScalarExpr, PlanError> { |
| 1256 | let qcx = QueryContext::root(scx, QueryLifetime::OneShot); |
| 1257 | let ecx = &ExprContext { |
| 1258 | qcx: &qcx, |
| 1259 | name: "DEFAULT expression", |
| 1260 | scope: &Scope::empty(), |
| 1261 | relation_type: &SqlRelationType::empty(), |
| 1262 | allow_aggregates: false, |
| 1263 | allow_subqueries: false, |
| 1264 | allow_parameters: false, |
| 1265 | allow_windows: false, |
| 1266 | }; |
| 1267 | let hir = plan_expr(ecx, expr)?.cast_to(ecx, CastContext::Assignment, target_ty)?; |
| 1268 | Ok(hir) |
| 1269 | } |
| 1270 | |
| 1271 | pub fn plan_params<'a>( |
| 1272 | scx: &'a StatementContext, |
no test coverage detected