Sha256: 671792e5ac89f0aa2a491b29f518187d6be02ebeff7cedb321d9077f5059ceeb

Contents?: true

Size: 680 Bytes

Versions: 6

Compression:

Stored size: 680 Bytes

Contents

# Project

Keeps only a subset of attributes.

## Signature

project(operand: Relation, attributes: AttrList) -> Relation

## Examples

project(suppliers, [:city])

project(suppliers, [:city], allbut: true)

## Description

Computes the relation obtained by projecting tuples from `operand` on a
subset of their attributes.

This operator supports an ALL BUT variant, through the `allbut` option.
When set to true, the operator _removes_ specified attributes instead of
keeping them. An `allbut` operator is also provided that has the same
effect.

## Implementation notes

Unlike SQL, this operator ALWAYS remove duplicates. There is no way, in
Alf, to compute _bags_ of tuples.

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
alf-shell-0.16.4 doc/txt/project.txt
alf-shell-0.16.3 doc/txt/project.txt
alf-shell-0.16.2 doc/txt/project.txt
alf-shell-0.16.1 doc/txt/project.txt
alf-shell-0.16.0 doc/txt/project.txt
alf-shell-0.15.0 doc/txt/project.txt