local help = CSelectHelp();
help:addField('name');
help:addField('age');
for i=0,10 do
local v = CVector();
v:push_back('name' .. i);
v:push_back(20+i);
help:addVectorValue(v);
end
help:dump();
for i=0,help:size()-1 do
print('name =' .. help:vs(i,'name'));
end
for i=0,help:size()-1 do
print('name =' .. help:valueStringByCol(i,0));
end
local iAgeIdx = help:getIndexByName('age');
print('column age is ' .. iAgeIdx);
help:addFieldWithData('city','');
help:dumpEx('city add');
help:setValueString(0,'city','杭州');
help:dumpEx('set city value');
help:resetValue();
help:dumpEx('resetValue');
help:reset();
help:dumpEx('reset');
help:genDebugData();
local helpTest = CSelectHelp();
helpTest:fromString(help:toString());
helpTest:dumpEx('from string');