lib/query.js
function postQuery(statArr) {
  var options = {
      method: 'POST',
      baseUrl: this.NEO4J_BASEURL,
      url: this.NEO4J_ENDPT,
      headers: {
        'Accept': 'application/json; charset=UTF-8',
        'Content-type': 'application/json'
      },
      json: {
        statements: statArr
          // [{statement: query, parameters: params},
          // {statement: query, parameters: params}]
      }
    }
    // call to the db server, returns a Promise
  return request(options).then(resolver).catch(function(e) {
    throw new Error(JSON.stringify(e))
  })
}
function postQuery(statArr) {
  var options = {
      method: 'POST',
      baseUrl: this.NEO4J_BASEURL,
      url: this.NEO4J_ENDPT,
      headers: {
        'Accept': 'application/json; charset=UTF-8',
        'Content-type': 'application/json'
      },
      json: {
        statements: statArr
          // [{statement: query, parameters: params},
          // {statement: query, parameters: params}]
      }
    }
    // call to the db server, returns a Promise
  return request(options).then(resolver).catch(function(e) {
    throw new Error(JSON.stringify(e))
  })
}
function postQuery ( statArr ) { var options = { method : 'POST' , baseUrl : this . NEO4J_BASEURL , url : this . NEO4J_ENDPT , headers : { 'Accept' : 'application/json; charset=UTF-8' , 'Content-type' : 'application/json' } , json : { statements : statArr // [{statement: query, parameters: params}, // {statement: query, parameters: params}] } } // call to the db server, returns a Promise return request ( options ) . then ( resolver ) . catch ( function ( e ) { throw new Error ( JSON . stringify ( e ) ) } ) }
POST a comitting query to the db.
@private
@param  {Array}   statArr  Array of statement objects.
@param  {Function} callback Function with (err, res, body) args for the query result.
@return {Promise}  A promise object resolved with the query results from the request module.
POST a comitting query to the db .