| 16 | } |
| 17 | |
| 18 | void 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 | |
| 33 | bool lbug_prepared_statement_is_success(lbug_prepared_statement* prepared_statement) { |
| 34 | return static_cast<PreparedStatement*>(prepared_statement->_prepared_statement)->isSuccess(); |