Sha256: 7e935ab2b86b810acfb46e398f854a71caf8da637c7298134d884986a400da03

Contents?: true

Size: 863 Bytes

Versions: 6

Compression:

Stored size: 863 Bytes

Contents

# Wrap

Tuple-valued attribute

## Signature

wrap(operand: Relation, attributes: AttrList, as: AttrName) -> Relation

## Examples

wrap(suppliers, [:city, :status], :extra)

wrap(suppliers, [:city, :status], :extra, allbut: true)

## Description

Computes the relation obtained by removing `attributes` and replacing them
by a single attribute (`as`). The latter is a tuple-valued attribute
obtained by projecting the input tuple on `attributes`.

This operators supports an ALL BUT variant, through the `allbut` option.
When set to true, the operator keeps specified attributes and wraps all the
remaining ones as a tuple-valued attribute.

## Implementation notes

This operator does not compile to SQL so far. Contributions are welcome to
provide it with a SQL compilation for SQL DBMSs that support this kind of
feature (e.g. PostgreSQL with JSON data type)

Version data entries

6 entries across 6 versions & 1 rubygems

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