public void setSelectKeyFields(String... keyFieldNames)
{
	Schema schema = sbuf.getSchema();
	if (keyFieldNames == null) {
		// Use names from schema
		int nkey = 0;
		for (int i=0; i<schema.size(); ++i) {
			SqlCol col = (SqlCol)schema.getCol(i);
			if (col.isKey()) ++nkey;
		}
		keyFields = new int[nkey];
		int j=0;
		for (int i=0; i<schema.size(); ++i) {
			SqlCol col = (SqlCol)schema.getCol(i);
			if (col.isKey()) keyFields[j++] = i;
		}
	} else {
		keyFields = new int[keyFieldNames.length];
		for (int i=0; i<keyFieldNames.length; ++i) {
			keyFields[i] = schema.findCol(keyFieldNames[i]);
		}
	}
	// Get inverse of key fields map
//	invKeyFields = new int[schema.getColCount()];
	for (int i=0; i<schema.size(); ++i) invKeyFields[i] = -1;
	for (int i=0; i<keyFields.length; ++i) invKeyFields[keyFields[i]] = i;
		
//	keys = new Object[keyFields.length];
	setNumKeys(keyFields.length);
}