toCursor = function (item, index) {
    const model = getModelOfInstance(item);
    const id = model ?
               typeof model.primaryKeyAttribute === 'string' ? item[model.primaryKeyAttribute] : null :
               item[Object.keys(item)[0]];
    return base64(JSON.stringify([id, index]));
  }
Creates a cursor given a item returned from the Database
@param  {Object}   item   sequelize row
@param  {Integer}  index  the index of this item within the results, 0 indexed
@return {String}          The Base64 encoded cursor string