MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / execAndReturnFirstInt

Method execAndReturnFirstInt

src/utilities/sql/PreparedStatement.cpp:66–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66boost::optional<int> PreparedStatement::execAndReturnFirstInt() const {
67 boost::optional<int> value;
68 if (m_db) {
69 int code = sqlite3_step(m_statement);
70 if (code == SQLITE_ROW) {
71 value = sqlite3_column_int(m_statement, 0);
72 }
73 }
74 return value;
75}
76
77boost::optional<std::string> PreparedStatement::execAndReturnFirstString() const {
78 boost::optional<std::string> value;

Callers 2

execAndReturnFirstIntFunction · 0.80
execAndReturnFirstIntFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected