UDAs
- UDA definitions that have the same name as a core attribute are not permitted.
This commit is contained in:
@@ -173,6 +173,9 @@ void Column::uda (std::map <std::string, Column*>& all)
|
|||||||
std::map <std::string, int>::iterator uda;
|
std::map <std::string, int>::iterator uda;
|
||||||
for (uda = udas.begin (); uda != udas.end (); ++uda)
|
for (uda = udas.begin (); uda != udas.end (); ++uda)
|
||||||
{
|
{
|
||||||
|
if (all.find (uda->first) != all.end ())
|
||||||
|
throw format (STRING_UDA_COLLISION, uda->first);
|
||||||
|
|
||||||
Column* c = Column::uda (uda->first);
|
Column* c = Column::uda (uda->first);
|
||||||
all[c->_name] = c;
|
all[c->_name] = c;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -687,6 +687,7 @@
|
|||||||
#define STRING_INFINITE_LOOP "Terminated substitution because more than {1} changes were made - infinite loop protection."
|
#define STRING_INFINITE_LOOP "Terminated substitution because more than {1} changes were made - infinite loop protection."
|
||||||
#define STRING_UDA_TYPE "User defined attributes may only be of type 'string', 'date', 'duration' or 'numeric'."
|
#define STRING_UDA_TYPE "User defined attributes may only be of type 'string', 'date', 'duration' or 'numeric'."
|
||||||
#define STRING_UDA_NUMERIC "The value '{1}' is not a valid numeric value."
|
#define STRING_UDA_NUMERIC "The value '{1}' is not a valid numeric value."
|
||||||
|
#define STRING_UDA_COLLISION "The UDA named '{1}' is the same as a core attribute, and is not permitted."
|
||||||
#define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'."
|
#define STRING_INVALID_MOD "The '{1}' attribute does not allow a value of '{2}'."
|
||||||
|
|
||||||
// Feedback
|
// Feedback
|
||||||
|
|||||||
Reference in New Issue
Block a user