Fix insert statement; add getPartitions() method