equal
deleted
inserted
replaced
73 // TODO: move this logic to relpipe-lib-infertypes and share with certain modules like relpipe-in-csv |
73 // TODO: move this logic to relpipe-lib-infertypes and share with certain modules like relpipe-in-csv |
74 currentMode.reset(); |
74 currentMode.reset(); |
75 for (RelationConfiguration rc : configuration.relationConfigurations) { |
75 for (RelationConfiguration rc : configuration.relationConfigurations) { |
76 if (std::regex_match(name, rc.relationPattern)) { |
76 if (std::regex_match(name, rc.relationPattern)) { |
77 if (rc.mode == MODE::METADATA || rc.mode == MODE::AUTO && MetadataMode::willInfer(attributes)) currentMode.reset(new MetadataMode(relationalWriter)); |
77 if (rc.mode == MODE::METADATA || rc.mode == MODE::AUTO && MetadataMode::willInfer(attributes)) currentMode.reset(new MetadataMode(relationalWriter)); |
78 else if (rc.mode == MODE::DATA) currentMode.reset(new DataMode(relationalWriter)); |
78 else if (rc.mode == MODE::DATA || rc.mode == MODE::AUTO) currentMode.reset(new DataMode(relationalWriter)); |
79 else throw std::logic_error("Unsupported mode: " + std::to_string((int) rc.mode)); |
79 else throw std::logic_error("Unsupported mode: " + std::to_string((int) rc.mode)); |
80 break; |
80 break; |
81 } |
81 } |
82 } |
82 } |
83 |
83 |