build/Query/EagerUtils.js
function eagerRelationship(neode, depth, alias, node_alias, node_variable, node_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 + ')';

    // Type
    pattern += '\n' + indent + indent + ',' + EAGER_TYPE + ': type(' + alias + ')';

    // Node Alias
    // pattern += `\n,${indent}${indent},${node_alias}`
    pattern += '\n' + indent + indent + ',' + node_alias + ': ';
    pattern += eagerNode(neode, depth + 1, node_variable, node_model);

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

    return pattern;
}
function eagerRelationship(neode, depth, alias, node_alias, node_variable, node_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 + ')';

    // Type
    pattern += '\n' + indent + indent + ',' + EAGER_TYPE + ': type(' + alias + ')';

    // Node Alias
    // pattern += `\n,${indent}${indent},${node_alias}`
    pattern += '\n' + indent + indent + ',' + node_alias + ': ';
    pattern += eagerNode(neode, depth + 1, node_variable, node_model);

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

    return pattern;
}
function eagerRelationship ( neode , depth , alias , node_alias , node_variable , node_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 + ')' ; // Type pattern += '\n' + indent + indent + ',' + EAGER_TYPE + ': type(' + alias + ')' ; // Node Alias // pattern += `\n,${indent}${indent},${node_alias}` pattern += '\n' + indent + indent + ',' + node_alias + ': ' ; pattern += eagerNode ( neode , depth + 1 , node_variable , node_model ) ; pattern += '\n' + indent + '}' ; return pattern ; }
Produces a Cypher pattern for a consistant eager loading format for a
Relationship and any subsequent eagerly loaded modules 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 Relationship and any subsequent eagerly loaded modules up to the maximum depth .