MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / lbug_prepared_statement_destroy

Function lbug_prepared_statement_destroy

src/c_api/prepared_statement.cpp:18–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18void lbug_prepared_statement_destroy(lbug_prepared_statement* prepared_statement) {
19 if (prepared_statement == nullptr) {
20 return;
21 }
22 if (prepared_statement->_prepared_statement != nullptr) {
23 delete static_cast<PreparedStatement*>(prepared_statement->_prepared_statement);
24 prepared_statement->_prepared_statement = nullptr;
25 }
26 if (prepared_statement->_bound_values != nullptr) {
27 delete static_cast<std::unordered_map<std::string, std::unique_ptr<Value>>*>(
28 prepared_statement->_bound_values);
29 prepared_statement->_bound_values = nullptr;
30 }
31}
32
33bool lbug_prepared_statement_is_success(lbug_prepared_statement* prepared_statement) {
34 return static_cast<PreparedStatement*>(prepared_statement->_prepared_statement)->isSuccess();

Callers 3

TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 3

TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68