| 351 | } |
| 352 | |
| 353 | static void bindParametersNoLock(PreparedStatement& preparedStatement, |
| 354 | const std::unordered_map<std::string, std::unique_ptr<Value>>& inputParams) { |
| 355 | for (auto& key : preparedStatement.getKnownParameters()) { |
| 356 | if (inputParams.contains(key)) { |
| 357 | // Found input. Update parameter map. |
| 358 | preparedStatement.updateParameter(key, inputParams.at(key).get()); |
| 359 | } |
| 360 | } |
| 361 | for (auto& key : preparedStatement.getUnknownParameters()) { |
| 362 | if (!inputParams.contains(key)) { |
| 363 | throw Exception("Parameter " + key + " not found."); |
| 364 | } |
| 365 | preparedStatement.addParameter(key, inputParams.at(key).get()); |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | std::unique_ptr<QueryResult> ClientContext::executeWithParams(PreparedStatement* preparedStatement, |
| 370 | std::unordered_map<std::string, std::unique_ptr<Value>> inputParams, |
no test coverage detected