MCPcopy Create free account
hub / github.com/anse1/sqlsmith / case_expr

Method case_expr

expr.cc:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42case_expr::case_expr(prod *p, sqltype *type_constraint)
43 : value_expr(p)
44{
45 condition = bool_expr::factory(this);
46 true_expr = value_expr::factory(this, type_constraint);
47 false_expr = value_expr::factory(this, true_expr->type);
48
49 if(false_expr->type != true_expr->type) {
50 /* Types are consistent but not identical. Try to find a more
51 concrete one for a better match. */
52 if (true_expr->type->consistent(false_expr->type))
53 true_expr = value_expr::factory(this, false_expr->type);
54 else
55 false_expr = value_expr::factory(this, true_expr->type);
56 }
57 type = true_expr->type;
58}
59
60void case_expr::out(std::ostream &out)
61{

Callers

nothing calls this directly

Calls 1

consistentMethod · 0.45

Tested by

no test coverage detected