Exemple #1
0
ConstValue LocalView::runReduce(const ConstValue &rows) const {

	AutoArray<KeyAndDocId, SmallAlloc<256> > keylist;
	AutoArray<ConstValue, SmallAlloc<256> > values;
	keylist.reserve(rows.length());
	values.reserve(rows.length());
	for (JSON::ConstIterator iter = rows->getFwConstIter(); iter.hasItems();) {
		const JSON::ConstValue &v = iter.getNext();
		keylist.add(KeyAndDocId(v["key"],v["id"].getStringA()));
		values.add(v["value"]);
	}
	return reduce(keylist,values,false);

}
Exemple #2
0
int LightSpeed::AppBase::main_entry( int argc, wchar_t *argv[], ConstStrW pathname)
{
	AutoArray<ConstStrW> params;
	params.reserve(argc);
	for (int i = 0; i < argc; i++)
		params.add(ConstStrW(argv[i]));		
	appPathname = pathname;
	return startApp(Args(params));
}
Exemple #3
0
int LightSpeed::AppBase::main_entry( int argc, char *argv[], ConstStrW pathname)
{
	AutoArray<String> params;
	AutoArray<ConstStrW> wparams;
	params.reserve(argc);
	for (int i = 0; i < argc; i++)
		params.add(String(argv[i]));

	wparams.append(params);
	appPathname = pathname;
	return startApp(Args(wparams));
}