Socket
Socket
Sign inDemoInstall

@acastellon/neo4j

Package Overview
Dependencies
2
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @acastellon/neo4j

Neo4j persistence interface


Version published
Weekly downloads
13
Maintainers
1
Install size
7.84 MB
Created
Weekly downloads
 

Readme

Source

neo4j

A Simplified interface to Neo4j database using the official neo4j-driver library

configuration

saved for example as 'config.neo4j.js'

module.exports = {

    NEO4J_URL: 'bolt://127.0.0.1:11002'
    ,NEO4J_USER: 'neo4j'
    ,NEO4J_PASSWORD: 'neo4j2019'
    // ,NEO4J_DATABASE: '<database_name>'  // available in the future in v4.0
    ,TRACES : true
}
usage:
const config    = require('./config.neo4j.js');
const db        = require('@acastellon/neo4j')(config);
methods
Executing and returning an un-mutable results.
execute(cypher, parameters [, options])  

     * @param cypher - String with the cypher sentence to be executed
     * @param parameters - JSON object with the parameters to be used in substitution with the Cypher Sentence
     * @param options - optional JSON object that contains the connection and the session (generated automatically if it's null)
     * @return an object or List of Objects of the fields
Execute the sentence and returns a Promise
executeAsPromise(cypher, parameters [, options])

     * @param cypher - String with the cypher sentence to be executed
     * @param parameters - JSON object with the parameters to be used in substitution with the Cypher Sentence
     * @param options - optional JSON object that contains the connection and the session (generated automatically if it's null)
 
Execute and return an Stream object for the results. Used for long results.
executeAsStream(cypher, parameters [, options])

     * @param cypher - String with the cypher sentence to be executed
     * @param parameters  - JSON object with the parameters to be used in substitution with the Cypher Sentence
     * @param options - optional JSON object that contains the connection and the session (generated automatically if it's null)
     * @returns {Stream.Readable}
  
Execute Cypher sentences as a BATCH
executeBatch(queries [,options]);    
  
     * @param queries - a List of objects with pair keys { cypher : '', parameters: '' } to be executed
     * @param options - optional JSON object that contains the connection and the session (generated automatically if it's null)
     * @returns {boolean} if the batch was executed successfully

Keywords

FAQs

Last updated on 17 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc