MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / processOnTrigger

Method processOnTrigger

extensions/sql/processors/PutSQL.cpp:81–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void PutSQL::processOnTrigger(core::ProcessSession& session) {
82 const auto dbSession = connection_->getSession();
83
84 try {
85 dbSession->begin();
86 for (const auto& statement : sqlStatements_) {
87 dbSession->execute(statement);
88 }
89 dbSession->commit();
90 } catch (std::exception& e) {
91 logger_->log_error("SQL statement error: %s", e.what());
92 dbSession->rollback();
93 throw;
94 }
95}
96
97} /* namespace processors */
98} /* namespace minifi */

Callers 1

onTriggerMethod · 0.45

Calls 7

getSessionMethod · 0.80
log_errorMethod · 0.80
beginMethod · 0.45
executeMethod · 0.45
commitMethod · 0.45
whatMethod · 0.45
rollbackMethod · 0.45

Tested by

no test coverage detected