[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-recutils] New %constraint special field and => operator
From: |
Jose E. Marchesi |
Subject: |
[bug-recutils] New %constraint special field and => operator |
Date: |
Tue, 31 Jul 2012 16:26:14 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Hi folks.
I just pushed a patch providing support (implementation, tests and
documentation) for two new facilities:
- A new sex operator => (implies) with semantics:
A => B means !A || (A && B)
Usage example: if the task is closed then it must have at least one
ClosedBy field:
Status = 'CLOSED' => #ClosedBy
- A new special field %constraint, which adds a sex-driven constraint to
the records of that type. Example:
%rec: Task
%type: Start,End date
%constraint: Start << End
%constraint: Status = 'CLOSED' => #End
Meaning that for any task the Start date cannot be after the Start
date (which makes sense :D) and that if a class is closed then it must
have an End date.
As always testing, comments and patches are welcome :)
PS: Is %constraint the better name for this special field?
--
Jose E. Marchesi http://www.jemarch.net
GNU Project http://www.gnu.org
- [bug-recutils] New %constraint special field and => operator,
Jose E. Marchesi <=