}
key_part_ptrArray = Key_part_ptrArray.create(keyPartsSize + 1);
try {
// the key part pointer array has one entry for each key part
// plus one extra for "null-terminated array concept"
Key_part_ptr key_part_ptr;
for (int i = 0; i < keyPartsSize; ++i) {
// each key part ptr consists of a ByteBuffer (char *) and length
key_part_ptr = key_part_ptrArray.at(i);
key_part_ptr.ptr(keyParts.get(i).buffer);
key_part_ptr.len(keyParts.get(i).length);
}
// the last key part needs to be initialized to (char *)null
key_part_ptr = key_part_ptrArray.at(keyPartsSize);
key_part_ptr.ptr(null);
key_part_ptr.len(0);
ndbTransaction = ndb.startTransaction(
table, key_part_ptrArray,
partitionKeyScratchBuffer, partitionKeyScratchBuffer.capacity());
handleError (ndbTransaction, ndb);
return ndbTransaction;