Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypher-talker

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypher-talker

Simple ES6/7-oriented lib to work with neo4j and (in future) with OpenCypher-compatible databases

  • 0.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Simple ES6/7-oriented lib to work with neo4j and (in future) with OpenCypher-compatible databases

this software is early alpha stage and is not supposed to be used in production

Intended to be used as backing layer for other libraries

Usage example

console.log(Cypher.tag`test: ${'testVar'}`.getRawQuery()) 
// => {query: 'test: {v0}', params: {v0: 'testVar'}}

and embedded requests:

const req = Cypher.tag`test2: ${`testVar`}`
console.log(Cypher.tag`test${req}`.getRawQuery())
// => {query: 'test: test2: {v0_0}', params: {v0_0: 'testVar'}}

Utility helpers:

//Cypher.raw:
Cypher.tag`CREATE (entry:${Cypher.raw(label)})`
//cypher.literal - iterates over object so it can be used for props:
Cypher.tag`MATCH (target ${Cypher.literal(props)})`

API

export class Connection {
    constructor(/*neo4j arguments for now*/) 
}

export class Cypher {
    static defaultPrefix: string = 'v'
    
    static raw(string): Cypher.Raw
    
    static tag(Array<string>, ...Array<any>): Cypher // used as string tag
       
    static literal(Object): Cypher
    
    getRawQuery(): {query: string, params: Object}     
}

Roadmap

  • request optimisation

Keywords

FAQs

Package last updated on 23 Dec 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc