kdb - 具有多个参数的 kdb 更新语句中的行操作
问题描述
myFunc:{[x]
// ...
}
我知道我可以通过这种方式使用更新语句对我的表执行行操作:
update newVal: myFunc each someField from someTable;
现在,如果我的函数需要 2 个参数:
myFunc2: {[x;y]
// x and y are different types
}
我现在如何在每行操作中传递两个参数?我试过这些:
update newVal: myFunc2 each someField, otherField from someTable;
update newVal: myFunc2 . (someField;otherField) from someTable;
似乎没有用,将多个参数传递给更新 stmt 中的函数的正确方法是什么?
解决方案
您应该使用each-both副词'
,如下例所示
update newVal: myFunc2'[someField;otherField] from someTable
推荐阅读
- python - 如何在 Python 中捕获特定的索引错误并为此附加新值?
- javascript - 是否可以访问表外的 BTable 道具?
- google-sheets - 跨工作表的条件格式以基于大于比较突出显示单元格
- node.js - 如何在打字稿中合并来自不同文件的不同快递路线
- python - 具有图像尺寸的预测时的 Faster-RCNN Pytorch 问题
- ios - 将图像文件保存在文档目录中并从中获取图像文件并在 Objective C 中的视图上显示
- javascript - 当我使用 app.js 中的模板时,当我使用 zepto.js(甚至是 jquery)时,我无法通过 ajax 连接 php 代码
- python-3.x - 如何在特征(列)少于训练集的样本上测试 nlp 模型?
- unix - Sed 命令将检查我的文件的第二列并删除匹配的数据
- javascript - 如何在 javascript/jquery 中创建带有左窗格和可拖动对象的网页