MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / read_info

Function read_info

cp-profiler/src/cpprofiler/db_handler.cpp:121–141  ·  view source on GitHub ↗

Read all Info from the database

Source from the content-addressed store, hash-verified

119
120/// Read all Info from the database
121static bool read_info(QSqlDatabase *db, Execution &ex)
122{
123 const auto query = "select * from Info;";
124 QSqlQuery select_info_ (*db);
125 select_info_.prepare(query);
126
127 bool success = select_info_.exec();
128 if(!success) return false;
129
130 auto &sd = ex.solver_data();
131
132 while (select_info_.next())
133 {
134 const auto nid = NodeID(select_info_.value(0).toInt());
135 const auto info_text = select_info_.value(1).toString().toStdString();
136
137 sd.setInfo(nid, {info_text});
138 }
139
140 return success;
141}
142
143/// Read all nogoods from the database
144static bool read_nogoods(QSqlDatabase *db, Execution &ex)

Callers 1

load_executionFunction · 0.85

Calls 5

nextMethod · 0.80
setInfoMethod · 0.80
NodeIDClass · 0.50
valueMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected