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

Method test

postgres.cc:73–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void dut_pqxx::test(const std::string &stmt)
74{
75 try {
76#if !defined(HAVE_LIBPQXX7) && !defined(HAVE_LIBPQXX8)
77 if(!c.is_open())
78 c.activate();
79#endif
80
81 pqxx::work w(c);
82 w.exec(stmt.c_str());
83 w.abort();
84 } catch (const pqxx::failure &e) {
85 if ((dynamic_cast<const pqxx::broken_connection *>(&e))) {
86 /* re-throw to outer loop to recover session. */
87 throw dut::broken(e.what());
88 }
89
90 if (regex_match(e.what(), e_timeout))
91 throw dut::timeout(e.what());
92 else if (regex_match(e.what(), e_syntax))
93 throw dut::syntax(e.what());
94 else
95 throw dut::failure(e.what());
96 }
97}
98
99
100schema_pqxx::schema_pqxx(std::string &conninfo, bool no_catalog) : c(conninfo)

Callers

nothing calls this directly

Calls 5

brokenClass · 0.85
timeoutClass · 0.85
syntaxClass · 0.85
failureClass · 0.85
whatMethod · 0.80

Tested by

no test coverage detected