Functional form of queries

Is there a handy way to take a query and generate its functional form?I can’t find how to express in functional form the case of injecting aconstant “by” column of symbol type into the result, a case notcovered in the discussion of functional forms anywhere that I couldfind. For example, let enl: {(enlist x)!(enlist x)} t:(a:1 1 2 2;b:10 20 30 40)Then “select b by a from t” is the same as “?[t;();enla;enlb]” butwhat is the equivalent of “select b by a,k:u from t"? Whatever it is,it is not "?[t;();ak!au;enlb]”. It is possible to inject a non-symbol constant in this way, e.g., “?[t;();ak!(a,0);enlb]” worksfine but things go pear-shaped for a symbol constant.

parse is handy

Date: Tue, 10 Mar 2009 15:26:30 +0000Message-ID: <1855e77f0903100826r67b58be7pc8e32b914eb5bd5b@mail.gmail.com>Subject: Re: [personal kdb+] Re: Functional form of queriesFrom: Attila Vrabecz <attila.vrabecz>To: personal-kdbplus@googlegroups.comand you need to enlist symbols to make them constant?[t;();`a`k!(`a;enlist`u);enl`b] AttilaOn Tue, Mar 10, 2009 at 3:19 PM, Manish Patel <manni.patel> wrote:> parse is handy>> On Tue, Mar 10, 2009 at 3:16 PM, annakh7 wrote:>>>> Is there a handy way to take a query and generate its functional form?>> I can’t find how to express in functional form the case of injecting a>> constant “by” column of symbol type into the result, a case not>> covered in the discussion of functional forms anywhere that I could>> find. For example, let>>>> ? enl: {(enlist x)!(enlist x)}>> ? t:(a:1 1 2 2;b:10 20 30 40)>>>> Then “select b by a from t” is the same as “?[t;();enl`a;enl`b]” but>> what is the equivalent of “select b by a,k:`u from t”? Whatever it is,>> it is not “?[t;();`a`k!`a`u;enl`b]”. It is possible to inject a non->> symbol constant in this way, e.g., “?[t;();`a`k!(`a,0);enl`b]” works>> fine but things go pear-shaped for a symbol constant.>>>>>>> >></manni.patel></attila.vrabecz>