Sha256: 8d3fce771c66e9efa4911efbeafc98c7bb487c9d10db5879a34f7b91970a9c9c

Contents?: true

Size: 927 Bytes

Versions: 1

Compression:

Stored size: 927 Bytes

Contents

.TH Extend
.PP
Extends input tuples with derived/computed attributes
.SH Signature
.PP
.RS
.nf
extend(operand: Relation, ext: TupleComputation) -> Relation
.fi
.RE
.SH Examples
.PP
.RS
.nf
extend(suppliers,
  big:   ->(t){ t.name.upcase },
  small: ->(t){ t.name.downcase })
.fi
.RE
.SH Description
.PP
Computes a relation which is the same as \fB\fCoperand\fR, except that each of
its tuples has new attributes whose value is the result of evaluating the
tuple expressions specified in \fB\fCext\fR\&.
.SH Implementation notes
.PP
As of current Alf version, this operator cannot be translated to SQL code.
In other words, all computations are done in ruby, which may seriously
hurt performance.
.PP
Similarly, as \fB\fCextend\fR tends to be a showstopper during compilation, it is
strongly recommanded to use it as high as possible in query expressions
trees so as to delegate the largest possible query parts to data engines.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alf-shell-0.15.0 doc/man/extend.man