src/entity_set/async_view.js
function createUpdateStream(origin, target, options, completeCb) {
    // console.log('[EntitySetAsyncView][createUpdateStream]', 'from', origin.cid, 'to', target.cid );
    // let source = origin.source(options);
    // let sink = target.sink({}, completeCb);
    options = { ...options, emitEntities: true };

    let args = [origin.source(options)];

    if (options.debug) {
        args.push(
            PullMap(val => {
                let [data, dataOptions] = val;
                console.log('[EntitySetAsyncView][>]', origin.cid, target.cid, stringify(data));
                return val;
            })
        );
    }

    if (options.query) {
        args.push(QueryFilter(options.query, options));
    }

    args.push(target.sink({ source: origin }, completeCb));

    return Pull.apply(null, args);
}
function createUpdateStream(origin, target, options, completeCb) {
    // console.log('[EntitySetAsyncView][createUpdateStream]', 'from', origin.cid, 'to', target.cid );
    // let source = origin.source(options);
    // let sink = target.sink({}, completeCb);
    options = { ...options, emitEntities: true };

    let args = [origin.source(options)];

    if (options.debug) {
        args.push(
            PullMap(val => {
                let [data, dataOptions] = val;
                console.log('[EntitySetAsyncView][>]', origin.cid, target.cid, stringify(data));
                return val;
            })
        );
    }

    if (options.query) {
        args.push(QueryFilter(options.query, options));
    }

    args.push(target.sink({ source: origin }, completeCb));

    return Pull.apply(null, args);
}
function createUpdateStream ( origin , target , options , completeCb ) { // console.log('[EntitySetAsyncView][createUpdateStream]', 'from', origin.cid, 'to', target.cid ); // let source = origin.source(options); // let sink = target.sink({}, completeCb); options = { ... options , emitEntities : true } ; let args = [ origin . source ( options ) ] ; if ( options . debug ) { args . push ( PullMap ( val => { let [ data , dataOptions ] = val ; console . log ( '[EntitySetAsyncView][>]' , origin . cid , target . cid , stringify ( data ) ) ; return val ; } ) ) ; } if ( options . query ) { args . push ( QueryFilter ( options . query , options ) ) ; } args . push ( target . sink ( { source : origin } , completeCb ) ) ; return Pull . apply ( null , args ) ; }
Creates a pull-stream from the source to the destination

@param {*} entitySet
@param {*} view
Creates a pull - stream from the source to the destination