redisgraph.ts
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

redisgraph.ts

TypeScript implementation of redisgraph.js.

RedisGraph TypeScript Client

Installation

Installation is done using the npm install command:

$ npm install --save redisgraph.ts

Overview

Official Releases

Example: Using the Typescript Client

import { RedisGraph } from "redisgraph.ts";

(async () => {
	const graph = new RedisGraph("social");
	await graph.query("CREATE (:person{name:'roi',age:32})");
	await graph.query("CREATE (:person{name:'amit',age:30})");
	await graph.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[:knows]->(a)");
	const res = await graph.query("MATCH (a:person)-[:knows]->(:person) RETURN a");

	while (res.hasNext()) {
		const record = res.next();
		console.log(record.get("a.name"));
	}
	console.log(res.getStatistics().queryExecutionTime());

})().catch(err => console.log(err))

Running tests

A simple test suite is provided, and can be run with:

$ npm test

The tests expect a Redis server with the RedisGraph module loaded to be available at localhost:6379

License

redisgraph.js is distributed under the BSD3 license - see LICENSE

Readme

Keywords

none

Package Sidebar

Install

npm i redisgraph.ts

Weekly Downloads

3

Version

1.2.1

License

BSD 3

Unpacked Size

28.8 kB

Total Files

21

Last publish

Collaborators

  • deniscarriere