nl_tokens: List the local records for the given datasetClient from the fhsync - <datasetId > - records collection
pl_tokens: function listDatasetClientRecords ( datasetClientJson , projection , cb ) { <mask> ( 'listDatasetClientRecords datasetClientJson = %j' , datasetClientJson ) ; var datasetId = datasetClientJson . datasetId ; var datasetRecordsCol = mongoClient . collection ( getDatasetRecordsCollectionName ( datasetId ) ) ; var cursor = datasetRecordsCol . find ( { 'refs' : datasetClientJson . id } ) ; if ( projection ) { cursor = cursor . project ( projection ) ; } else { cursor = cursor . project ( { 'refs' : 0 } ) ; } return cursor . toArray ( function ( err , records ) { if ( err ) { debug ( '[%s] Failed to list datasetClient records due to error %s :: datasetClientJson = %j' , err , datasetClientJson ) ; } return cb ( err , records ) ; } ) ; }