Rename

Rename attributes

Signature

rename(operand: Relation, renaming: Renaming) -> Relation

Examples

rename(suppliers, :sid => :supplier_id, :city => :lives_in)

Description

Computes the same relation as operand expect that some attributes have been renamed.

Implementation notes

As of current version, renamings can only be expressed through a Hash mapping input to output attribute names.

Other ways of specifying renamining will be added in future versions, such as prefixing, postfixing, renaming through a Proc, etc. Any patch towards these improvements is welcome.