Hi there,
It would be useful to be able to ignore fields when using RECORD()
mainly to avoid circular dependencies.
One example:
- Column “template_data” is
RECORD(rec, expand_refs=1)
- Column “content1” is
return tpl.substitute($template1, $template_data)
- Column “content2” is
return tpl.substitute($template2, $template_data)
Both content1
and content2
would have the following before the code above:
from string import Template
def tpl(template, data):
return Template(template).substitute(data)
This example will crash the content fields as there will be a circular dependency as soon as you add either content1
or content2
.
This is a barebones example where you would put the RECORD
call inside the content columns, but on a more complex situation where template_data
becomes more involved and duplication is less of an option… you’re screwed.
It would be useful for RECORD
to accept an exclude_columns=[]
so template_data
would be RECORD(rec, expands_refs=1, exclude_columns=['content1', 'content2'])