MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / validatePropertyName

Function validatePropertyName

src/binder/bind/bind_ddl.cpp:65–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static void validatePropertyName(const std::vector<PropertyDefinition>& definitions) {
66 case_insensitve_set_t nameSet;
67 for (auto& definition : definitions) {
68 if (nameSet.contains(definition.getName())) {
69 throw BinderException(std::format(
70 "Duplicated column name: {}, column name must be unique.", definition.getName()));
71 }
72 if (Binder::reservedInColumnName(definition.getName())) {
73 throw BinderException(
74 std::format("{} is a reserved property name.", definition.getName()));
75 }
76 nameSet.insert(definition.getName());
77 }
78}
79
80std::vector<PropertyDefinition> Binder::bindPropertyDefinitions(
81 const std::vector<ParsedPropertyDefinition>& parsedDefinitions, const std::string& tableName) {

Callers 1

Calls 3

containsMethod · 0.45
getNameMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected