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

Method upsert_stmt

grammar.cc:453–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451
452
453upsert_stmt::upsert_stmt(prod *p, struct scope *s, table *v)
454 : insert_stmt(p,s,v)
455{
456 match();
457
458 if (!victim->constraints.size())
459 fail("need table w/ constraint for upsert");
460
461 set_list = std::make_shared<struct set_list>(this, victim);
462 search = bool_expr::factory(this);
463 constraint = random_pick(victim->constraints);
464}
465
466shared_ptr<prod> statement_factory(struct scope *s)
467{

Callers

nothing calls this directly

Calls 2

random_pickFunction · 0.85
failFunction · 0.70

Tested by

no test coverage detected