public class PrimaryKeyParserTest {
private static Index createIndex(int colCount, boolean binary) {
NewAISBuilder builder = AISBBasedBuilder.create("test",
MTypesTranslator.INSTANCE);
String[] colNames = new String[colCount];
NewTableBuilder table = builder.table("t");
char colName = 'a';
for(int i = 0; i < colCount; ++i) {
colNames[i] = String.valueOf(colName++);
if (binary) {
table.colVarBinary(colNames[i], 16, false);
}
else {
table.colInt(colNames[i], false);
}
}
table.pk(colNames);
return builder.ais(true).getTable("test", "t").getPrimaryKey().getIndex();
}