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

Function count_nodes

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

Source from the content-addressed store, hash-verified

44};
45
46static int count_nodes(QSqlDatabase *db)
47{
48 const auto query = "select count(*) from Nodes;";
49 QSqlQuery count_stmt(*db);
50 count_stmt.prepare(query);
51 count_stmt.exec();
52 count_stmt.next();
53 return count_stmt.value(0).toInt();
54}
55
56/// Reads all nodes from a database and builds the tree; returns `true` on success
57static bool read_nodes(QSqlDatabase *db, Execution &ex)

Callers 1

read_nodesFunction · 0.85

Calls 2

nextMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected