| 24 | } |
| 25 | |
| 26 | static bool getBoolCopyOption(const options_t& parsingOptions, const char* optionName, |
| 27 | bool defaultValue) { |
| 28 | const auto it = parsingOptions.find(optionName); |
| 29 | if (it == parsingOptions.end()) { |
| 30 | return defaultValue; |
| 31 | } |
| 32 | const auto& value = *it->second; |
| 33 | auto strValue = value.toString(); |
| 34 | StringUtils::toUpper(strValue); |
| 35 | if (strValue == "TRUE" || strValue == "1") { |
| 36 | return true; |
| 37 | } |
| 38 | if (strValue == "FALSE" || strValue == "0") { |
| 39 | return false; |
| 40 | } |
| 41 | throw BinderException( |
| 42 | std::format("The type of copy parsing option {} must be a boolean.", optionName)); |
| 43 | } |
| 44 | |
| 45 | std::unique_ptr<BoundStatement> Binder::bindLegacyCopyRelGroupFrom(const Statement& statement) { |
| 46 | auto& copyFrom = statement.constCast<CopyFrom>(); |
no test coverage detected