How to get a field(s) list from DataSet

从DataSet中可以返回一列的数组,如[{id:1, code:"A1"},{id:2, code:"A2"},{id:3, code:"A3"},{id:4, code:"A3"}]

getStrings("code")返回["A1","A2","A3","A3"]
getStrings("{id}-{code}")返回["1-A1","2-A2","3-A3","4-A3"]
getDistinctStrings("code")可以返回不重复的数据["A1","A2","A3"]

返回多列一般用extract(String .. keys)返回的还是一个DataSet

首页 最近更新 搜索 提交 回复