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

Method execAndReturnFirstDouble

src/utilities/sql/PreparedStatement.cpp:55–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55boost::optional<double> PreparedStatement::execAndReturnFirstDouble() const {
56 boost::optional<double> value;
57 if (m_db) {
58 int code = sqlite3_step(m_statement);
59 if (code == SQLITE_ROW) {
60 value = sqlite3_column_double(m_statement, 0);
61 }
62 }
63 return value;
64}
65
66boost::optional<int> PreparedStatement::execAndReturnFirstInt() const {
67 boost::optional<int> value;

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.64