Sha256: 6820a99247d6bd266edd65e456bbc7b7bbed94237f490e77a5812dfa1a41a233

Contents?: true

Size: 853 Bytes

Versions: 3

Compression:

Stored size: 853 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.4 doc/man/native.man
alf-shell-0.16.0 doc/man/native.man
alf-shell-0.15.0 doc/man/native.man