Sha256: 1433034cf8a047d99d780315e1d0f971c46d452c7fc9aeb21e6c81bb3a2bc343

Contents?: true

Size: 856 Bytes

Versions: 3

Compression:

Stored size: 856 Bytes

Contents

.TH Native
.PP
User\-defined tuple predicate
.SH Signature
.PP
.RS
.nf
native(predicate: (Tuple \-> Boolean)) \-> Predicate
.fi
.RE
.SH Examples
.PP
.RS
.nf
\->(t){ t.city == 'London' }
.fi
.RE
.SH Description
.PP
So called 'native' predicates are functions computing truth values from
tuples.
.SH Implementation notes
.PP
Native predicates can be any ruby Proc object of arity 1. The argument
will be a Tuple instance. the Proc SHOULD return true or false, but ruby
patterns for boolean expressions are supported to (such a nil evaluating
to false, etc.).
.PP
Note that, as of current Alf version, native predicates cannot be delegated
to an underlying data engine, and are not compiled to SQL in particular.
Please always use predicate factories such as \fB\fCeq(:city, 'London')\fR if
possible, as they do not hurt logical optimizations and compilation.

Version data entries

3 entries across 3 versions & 1 rubygems

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