| 50 | } |
| 51 | |
| 52 | bool PreparedStatement::canReuseCachedPlanWith( |
| 53 | const std::unordered_map<std::string, std::unique_ptr<Value>>& inputParams) const { |
| 54 | if (!unknownParameters.empty()) { |
| 55 | return false; |
| 56 | } |
| 57 | for (auto& [key, value] : inputParams) { |
| 58 | if (!parameterMap.contains(key)) { |
| 59 | return false; |
| 60 | } |
| 61 | if (parameterMap.at(key)->getDataType() != value->getDataType()) { |
| 62 | return false; |
| 63 | } |
| 64 | } |
| 65 | return true; |
| 66 | } |
| 67 | |
| 68 | static void validateParam(const std::string& paramName, Value* newVal, Value* oldVal) { |
| 69 | if (newVal->getDataType().getLogicalTypeID() == LogicalTypeID::POINTER && |
no test coverage detected