Add dynamic options to the [ ] settings for all objects.
pepperlk opened this issue · 3 comments
I would like to add dynamic context to the Table and Columns to better define a data model for metadata.
When parsing is working can the unknown items be put in a dictionary to be accessed for other processes wishing to extend DBML.
example:
Table ACCOUNT [note: "Account", description:"account", cdm_table: "account", generator: "<randomstring>"] { }
then when parsed this is available
parsed.tables[0].settings["cdm_table"]
This would allow extension of the objects in the parser dynamically for arbitrary data that is not needed for database scripting.
That's actually a nice idea.
Although I'd only allow this with a special flag explicitly specified in the parser object, something like PyDBML('myfile.dbml', allow_extra=True)
, with allow_extra
being False
by default. Otherwise we could break compatibility for the future DBML syntax versions.
I'll look into it, thanks for the suggestion
Love this.