Sha256: 76053041d136f6190184815c62c6e264f86b2c31c93b4423291ec244d3c090cb

Contents?: true

Size: 877 Bytes

Versions: 3

Compression:

Stored size: 877 Bytes

Contents

.TH Allbut
.PP
Projects a subset of attributes away.
.SH Signature
.PP
.RS
.nf
allbut(operand: Relation, attributes: AttrList) \-> Relation
.fi
.RE
.SH Examples
.PP
.RS
.nf
allbut(suppliers, [:city])
.fi
.RE
.SH Description
.PP
Computes the relation obtained by removing a subset of attributes from
\fB\fCoperand\fR tuples.
.PP
This operator is the inverse of \fB\fCproject\fR\&. While the latter \fIkeeps\fP
attributes, this one \fIremoves\fP them. \fB\fCproject\fR actually supports an allbut
variant, which is equivalent to this operator. In other words, this
operator can be understood as follows:
.PP
.RS
.nf
def allbut(operand, attributes)
  project(operand, attributes, allbut: true)
end
allbut(suppliers, [:city, :status])
.fi
.RE
.SH Implementation notes
.PP
Unlike SQL, this operator ALWAYS remove duplicates. There is no way, in
Alf, to compute \fIbags\fP of tuples.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
alf-shell-0.16.3 doc/man/allbut.man
alf-shell-0.16.2 doc/man/allbut.man
alf-shell-0.16.1 doc/man/allbut.man