src/query/pluck.js
function commandPluck(context, componentIDs, attributes, options) {
    // resolve the components to ids
    let result;
    let entitySet;

    // if( true ){ log.debug('pluck> ' + stringify(_.rest(arguments))); }

    attributes = context.valueOf(attributes, true);
    attributes = Array.isArray(attributes) ? attributes : [attributes];
    options = context.valueOf(options, true);

    entitySet = context.resolveEntitySet();

    // resolve the component ids
    // componentIDs = context.valueOf(componentIDs,true);
    // if( componentIDs ){
    //     componentIDs = context.registry.getIID( componentIDs, true );
    // }

    result = pluckEntitySet(
        context.registry,
        entitySet,
        componentIDs,
        attributes
    );

    if (options && options.unique) {
        result = arrayUnique(result);
    }

    return context.last = [VALUE, result];
}
function commandPluck(context, componentIDs, attributes, options) {
    // resolve the components to ids
    let result;
    let entitySet;

    // if( true ){ log.debug('pluck> ' + stringify(_.rest(arguments))); }

    attributes = context.valueOf(attributes, true);
    attributes = Array.isArray(attributes) ? attributes : [attributes];
    options = context.valueOf(options, true);

    entitySet = context.resolveEntitySet();

    // resolve the component ids
    // componentIDs = context.valueOf(componentIDs,true);
    // if( componentIDs ){
    //     componentIDs = context.registry.getIID( componentIDs, true );
    // }

    result = pluckEntitySet(
        context.registry,
        entitySet,
        componentIDs,
        attributes
    );

    if (options && options.unique) {
        result = arrayUnique(result);
    }

    return context.last = [VALUE, result];
}
function commandPluck ( context , componentIDs , attributes , options ) { // resolve the components to ids let result ; let entitySet ; // if( true ){ log.debug('pluck> ' + stringify(_.rest(arguments))); } attributes = context . valueOf ( attributes , true ) ; attributes = Array . isArray ( attributes ) ? attributes : [ attributes ] ; options = context . valueOf ( options , true ) ; entitySet = context . resolveEntitySet ( ) ; // resolve the component ids // componentIDs = context.valueOf(componentIDs,true); // if( componentIDs ){ //     componentIDs = context.registry.getIID( componentIDs, true ); // } result = pluckEntitySet ( context . registry , entitySet , componentIDs , attributes ) ; if ( options && options . unique ) { result = arrayUnique ( result ) ; } return context . last = [ VALUE , result ] ; }
Returns the attribute values of specified components in the specified
entitySet
Returns the attribute values of specified components in the specified entitySet