Names need to be globally unique
Closed this issue · 1 comments
fffej commented
At the moment, name uniqueness is only local.
A set of stored procedures ensures that they cannot have the same name, but there is no constraint that stops tables having the same name as a stored procedure.
One way to "solve" this problem might be to make all identifier names UUIDs (using say Data.UUID
) and then prior to rendering generate a map of UUID to RegularIdentifier
such that the name is unique?
An alternative implementation would be to make RegularIdentifier
generate values based on UUID's.
fffej commented
Design decision made. Using UUIDs as regular identifiers and rendering them as strings is OK.
Pros:
- This is always a valid identifier which simplifies the code.
Downside
- No testing of space of identifiers