[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-recutils] Recutils - User Feedback
From: |
John Darrington |
Subject: |
Re: [bug-recutils] Recutils - User Feedback |
Date: |
Sun, 5 Aug 2012 15:44:27 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Thanks Jose,
It sounds like you have it all planned then.
I have some improvements to recutils.texi (nothing major yet - just some typo
corrections)
How would you like to receive them? as patches? ona git branch? ...
J'
On Sun, Aug 05, 2012 at 02:05:57PM +0200, Jose E. Marchesi wrote:
Hi John.
Having read through the user manual over the last couple of weeks,
played with recutils a little, and of course attended Jose's
excellent presentations, my opinions on Recutils are as follows:
Thanks for the feedback! :)
1. Recsel can perform a single join only.
It would be extremely useful to be able to perform a query joining
3 or more
record types at once. Eg:
recsel -t Thing0 -j ThingA,ThingB -j ThingD file.rec
My idea here is that ThingA and ThingB are foriegn keys in Thing0,
whilst
ThingD is a foriegn key in the result of the first join.
I thought I could work around this limitation with something like
recsel -t Thing0 -j ThingA -d file.rec | recsel -t Thing0_ThingA -j
ThingD
but it seems not. Maybe it could if the -d flag was a little
more intelligent...
That is the idea. The implemenation of -d and the joins is not
complete: it must create a record descriptor with the proper definitions
so several recsels can be chained in a pipeline.
We could also support the first syntax as well, quite easily: it is a
matter of chaining several calls to the API function rec_db_query.
2. Recfmt has limited ability.
For example some kind of conditional syntax would make it a lot
more powerfull:
Dear {{$case Gender 'Male')Sir 'Female')Madam}},
of course there are ways around this problem, but that involves
makeing the database
architecture more complex.
Yep. A more powerful macro language for recfmt is in the TODO. See
http://lists.gnu.org/archive/html/bug-recutils/2011-05/msg00019.html for
a design I worked out some time ago.
3. Date expressions could be somewhat more flexible.
For example, the ability to match against only one field in a date.
# Select all those people who have birthdays in March
recsel -e "Date-of-Birth >> '01 March *' && Date-of-Birth << '31
March *' file.rec
Hmm. Another pending feature is the support of "scalar functions" in
selection expressions, in the same way they are supported in other
database systems.
Having scalar functions would probably fix the issue, because we could
add functions like Year(DATE), Month(DATE), Dady(DATE), etc.
--
Jose E. Marchesi http://www.jemarch.net
GNU Project http://www.gnu.org
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature