correctly implement getDatasets for the cpp side.