Socket
Socket
Sign inDemoInstall

falkordb

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

falkordb

A FalkorDB javascript library


Version published
Maintainers
0
Created
Source

Tests Coverage License Discord Twitter

falkordb-ts

Try Free

falkordb is a FalkorDB client for Node.js.

Installation

Start a falkordb via docker:

docker run -p 6379:6379 -it falkordb/falkordb:latest

To install node falkordb, simply:

npm install falkordb

Usage

Basic Example

import { FalkorDB } from 'falkordb';

const db = await FalkorDB.connect({
    username: 'myUsername',
    password: 'myPassword',
    socket: {
        host: 'localhost',
        port: 6379
    }
})

console.log('Connected to FalkorDB')

const graph = db.selectGraph('myGraph')

await graph.query(`CREATE (:Rider {name:'Valentino Rossi'})-[:rides]->(:Team {name:'Yamaha'}),
        (:Rider {name:'Dani Pedrosa'})-[:rides]->(:Team {name:'Honda'}),
        (:Rider {name:'Andrea Dovizioso'})-[:rides]->(:Team {name:'Ducati'})`)

result = await graph.query(`MATCH (r:Rider)-[:rides]->(t:Team) 
                            WHERE t.name = $name RETURN r.name`, 
                            {params: {name: 'Yamaha'}})
                            
console.log(result) // Valentino Rossi

console.log(await db.list())
console.log(await db.info())

db.close()

To learn more about Cypher query language check: https://docs.falkordb.com/cypher/

.close()

Forcibly close a client's connection to FalkorDB immediately. Calling close will not send further pending commands to the Redis server, or wait for or parse outstanding responses.

await client.close();

License

This repository is licensed under the "MIT" license. See LICENSE.

Keywords

FAQs

Package last updated on 19 Sep 2024

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