build/Query/EagerUtils.js
function eagerNode(neode, depth, alias, model) {
    var indent = '  '.repeat(depth * 2);
    var pattern = '\n' + indent + ' ' + alias + ' { ';

    // Properties
    pattern += '\n' + indent + indent + '.*';

    // ID
    pattern += '\n' + indent + indent + ',' + EAGER_ID + ': id(' + alias + ')';

    // Labels
    pattern += '\n' + indent + indent + ',' + EAGER_LABELS + ': labels(' + alias + ')';

    // Eager
    if (model && depth <= MAX_EAGER_DEPTH) {
        model.eager().forEach(function (rel) {
            pattern += '\n' + indent + indent + ',' + eagerPattern(neode, depth, alias, rel);
        });
    }

    pattern += '\n' + indent + '}';

    return pattern;
}
function eagerNode(neode, depth, alias, model) {
    var indent = '  '.repeat(depth * 2);
    var pattern = '\n' + indent + ' ' + alias + ' { ';

    // Properties
    pattern += '\n' + indent + indent + '.*';

    // ID
    pattern += '\n' + indent + indent + ',' + EAGER_ID + ': id(' + alias + ')';

    // Labels
    pattern += '\n' + indent + indent + ',' + EAGER_LABELS + ': labels(' + alias + ')';

    // Eager
    if (model && depth <= MAX_EAGER_DEPTH) {
        model.eager().forEach(function (rel) {
            pattern += '\n' + indent + indent + ',' + eagerPattern(neode, depth, alias, rel);
        });
    }

    pattern += '\n' + indent + '}';

    return pattern;
}
function eagerNode ( neode , depth , alias , model ) { var indent = '  ' . repeat ( depth * 2 ) ; var pattern = '\n' + indent + ' ' + alias + ' { ' ; // Properties pattern += '\n' + indent + indent + '.*' ; // ID pattern += '\n' + indent + indent + ',' + EAGER_ID + ': id(' + alias + ')' ; // Labels pattern += '\n' + indent + indent + ',' + EAGER_LABELS + ': labels(' + alias + ')' ; // Eager if ( model && depth <= MAX_EAGER_DEPTH ) { model . eager ( ) . forEach ( function ( rel ) { pattern += '\n' + indent + indent + ',' + eagerPattern ( neode , depth , alias , rel ) ; } ) ; } pattern += '\n' + indent + '}' ; return pattern ; }
Produces a Cypher pattern for a consistant eager loading format for a
Node and any subsequent eagerly loaded models up to the maximum depth.

@param {Neode} neode     Neode instance
@param {Integer} depth   Maximum depth to traverse to
@param {String} alias    Alias of the node
@param {Model} model     Node model
Produces a Cypher pattern for a consistant eager loading format for a Node and any subsequent eagerly loaded models up to the maximum depth .