Re: Fwd: Re: [Modeling-users] ec.fetch and SQL "in"
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-07-08 15:52:13
|
Yannick Gingras <yan...@sa...> wrote: > On July 8, 2003 10:11 am, Yannick Gingras wrote: > > > * The syntax really is '<attr> in/not in [ <v1>, <v2>, ...]', i.e. wi= th > > > square brackets, and it will remain as-is --as said in the docs I'm > > > not a grammar nor a spark expert, and it would take me too long to > > > allow parens '(v1, v2, ...)' here. > > > > This patch works like a charm ! > > > > : ) > > > > Thanks and congratulation for this instant implementation ! > > > > : ) Okay, I'll add this in the next release then. Need to work on some more unittests, but the patch itself for QualifierParser and SQLExpression will probably remain as-is. Any comment on lower-cased operators, anyone? The impact is mainly the following one: it increases the number of keywords that you cannot use as attributes' names in queries. To put it explicitely: you'll get a syntax error if one of your attributes in the qualifier strings is either 'AND', 'OR', NOT', 'like', 'ilike', well, you get the picture; by allowing upper/lower case versions of these operators, the list of reserved keywords is increased of a factor two. I do not think that anyone would use 'and' or 'not' as an attribute's name, but who knows... > Of course it should be documented that this kind of fetch is super > simpler to build with: >=20 > "val in %s" % repr(list(vallist)) >=20 > repr() of a list spit out exactly the string you want. Agreed, but "val in %s"%list(vallist) is a bit shorted, isn't it ;) > BTW there is and option in mailman for the replies to go directly to > the list instead of the sender. I think it would be nice to turn it > on... Well, yes, but... I won't go into that discussion here :) I did not turn it on because I mainly agree with sourceforge's policy (see https://sourceforge.net/docman/display_doc.php?docid=3D6693&group_id=3D1 and the pointers it contains) As for me, I've never been bitten by the nasty 'Oops I did not want to send that personal/offensive/mean/etc. material to the whole list', but I surely do not want it to happen! Of course it has already happened in the past that someone is replying to me by mistake rather than to the list, in these cases I notify the poster of its possible error and asks if the post could be forwarded to the list --it's not that frequent, and I can surely live with that. And it also happened that the original post was really directed to me, because for whatever reasons the original poster did not want its message to appear on the list. Hoping you won't be too upset by this answer ;) Regards, -- S=E9bastien. |