2022.03.12 09:33 PM
In the u.q file of the following set up, what is the purpose of the underscore here, (It doesn’t appear to me to be cut or drop)
del:{w[x]_:w[x;;0]?y};.z.pc:{del[;x]each t};
2022.03.13
04:24 AM
- last edited on
2022.03.14
02:46 PM
by
PCarroll
Hi,
it is drop in place to modify the dictionary w of table subscriptions. It is checking the list of subs for table x, for handle y, if there is an item it’s dropped from the list and w[x] is updated.
section at the bottom here on drop in place:
Drop in place
Assign through Drop to delete in place.
q)show d:`a`b`c`x!(1;2 3;4;5)
a| 1
b| 2 3
c| 4
x| 5
q)d _:`x
q)d
a| 1
b| 2 3
c| 4
Hope that helps, if not let me know.
2022.03.13
04:24 AM
- last edited on
2022.03.14
02:46 PM
by
PCarroll
Hi,
it is drop in place to modify the dictionary w of table subscriptions. It is checking the list of subs for table x, for handle y, if there is an item it’s dropped from the list and w[x] is updated.
section at the bottom here on drop in place:
Drop in place
Assign through Drop to delete in place.
q)show d:`a`b`c`x!(1;2 3;4;5)
a| 1
b| 2 3
c| 4
x| 5
q)d _:`x
q)d
a| 1
b| 2 3
c| 4
Hope that helps, if not let me know.
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.