exxeleron / qPython

interprocess communication between Python and kdb+
http://www.devnet.de
Apache License 2.0
152 stars 89 forks source link

functional q queries #75

Open rishabhnitc opened 4 years ago

rishabhnitc commented 4 years ago

As also described https://stackoverflow.com/questions/60989393/qpython-functional-queries

I am trying to make functional queries to q by passing where condition. when in q:

fn:{[c]
    t: (select from tbl);
    :?[t;c;0b;()];
}

in Python

c = [['=', numpy.string_('TradeId'), 123456]]
result = conn.sendSync('fn', c)

the operator is passed as a string. I have tried with sending this as a symbol, as a Qfunction but doesn't work