lib/write.js
function (graph, opts, params) {
    var self = this;
    var newNodes = graph.allNodes.filter(function(node) {
      return node.props[self.db.options.id] == null
          && !(node.model.uniqueness && node.model.uniqueness.returnOld);
    });

    if (!newNodes.length) return '';

    var statements = newNodes.map(function(node) {
      var label = node.model.type;
      return '(' + node.name + ':' + label + ')';
    });

    return 'CREATE ' + statements.join(',');
  }
function (graph, opts, params) {
    var self = this;
    var newNodes = graph.allNodes.filter(function(node) {
      return node.props[self.db.options.id] == null
          && !(node.model.uniqueness && node.model.uniqueness.returnOld);
    });

    if (!newNodes.length) return '';

    var statements = newNodes.map(function(node) {
      var label = node.model.type;
      return '(' + node.name + ':' + label + ')';
    });

    return 'CREATE ' + statements.join(',');
  }
function ( graph , opts , params ) { var self = this ; var newNodes = graph . allNodes . filter ( function ( node ) { return node . props [ self . db . options . id ] == null && ! ( node . model . uniqueness && node . model . uniqueness . returnOld ) ; } ) ; if ( ! newNodes . length ) return '' ; var statements = newNodes . map ( function ( node ) { var label = node . model . type ; return '(' + node . name + ':' + label + ')' ; } ) ; return 'CREATE ' + statements . join ( ',' ) ; }
get the CREATE statement of a write query this will create non-existant nodes
get the CREATE statement of a write query this will create non - existant nodes