The only 2 links I came across spoke of .z.vs and views and I am not even sure they work in conjunction with tables.
I have a simple situation - t:( a:(); b:())
I am looking for a trigger that would be activated once I insert something into a row say `t insert (1;2).
If nothing is available how are you handling this situation?
how about?t_insert_trigger:{ 0N!trigger; };upd:{[t;d] t insert d; t_insert_trigger[]; };upd[t;(a:1 2)];clients then need to call upd of course, and not insert throughstraight insert. q is a programming language, and let’s do you prettymuch what you want in the domain it has been designed for. maybe thereis another way I don’t know of yet.On Tue, Sep 17, 2013 at 5:34 PM, kdb newb wrote:> The only 2 links I came across spoke of .z.vs and views and I am not even> sure they work in conjunction with tables.> I have a simple situation - t:( a:(); b:())>> I am looking for a trigger that would be activated once I insert something> into a row say `t insert (1;2).> If nothing is available how are you handling this situation?>> –>
also, to decouple t_insert_trigger from upd, you might wanna look atthe q timer .z.ts.On Tue, Sep 17, 2013 at 5:52 PM, wp wrote:> how about?>> t_insert_trigger:{> 0N!trigger;> };>> upd:{[t;d]> t insert d;> t_insert_trigger[];> };>> upd[t;(a:1 2)];>> clients then need to call upd of course, and not insert through> straight insert. q is a programming language, and let’s do you pretty> much what you want in the domain it has been designed for. maybe there> is another way I don’t know of yet.>>>>> On Tue, Sep 17, 2013 at 5:34 PM, kdb newb wrote:>> The only 2 links I came across spoke of .z.vs and views and I am not even>> sure they work in conjunction with tables.>> I have a simple situation - t:( a:(); b:())>>>> I am looking for a trigger that would be activated once I insert something>> into a row say `t insert (1;2).>> If nothing is available how are you handling this situation?>>>> –>>