Closed blambeau closed 4 years ago
@felixyz written with Klaro's Board2CSV/XLS improvement in mind. Strictly speaking, I tend to see it like this:
board_stories
.project([...]) # only those wanted by the user
.transform(:to_human) # all dimension values presented as human readable
.to_csv
WDYT?
The commit introduces a new operator to apply shared transformations to all attributes (selective transformation is also possible, a bit like
extend
). The operator is inspired by Tutorial D's UPDATE op, yet usingupdate
clashes here with relvar/SQL update intuition.TRANSFORM uses ruby semantics for now, is not compiled to SQL, and provides no optimization so far. It makes various transformation much easier than before:
EXTEND is supposed to be used for adding attributes only, not transforming existing ones. The introduction of TRANSFORM make this clearer by providing an official alternative. The aim is to make formal logic (e.g. optimizer) slightly more powerful, through PRE strengtening (in 1.0) along those rules.