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

smallorange-redis-edge-graph

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smallorange-redis-edge-graph

Minimum graph's edge data structure implemented with redis

  • 1.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

CircleCI

Small Orange Redis Edge Graph

Node API

	delete({
		entity? string,
		node: string
	}): Observable<object>;

	get({
		entity? string,
		node: string
	}): Observable<object>;

	multiGet({
		entity? string,
		nodes: Array<string>
	}): Observable<Array<object>>;

	set({
		entity? string,
		node: string,
		data: object
	}): Observable<object>;

	multiSet({
		entity? string,
		values: Array<{
			node: string,
			data?: object
		}>,
	}): Observable<Array<object>>;

	patch({
		entity? string,
		node: string,
		data: object
	}): Observable<object>;

Edge API

	allAll({
		collection: Array<string>,
		direction?: string
		distance?: (collectionSize, fromNodeIndex, toNodeIndex) => number, 
		entity? string,
		noTimestamp?: boolean
	}): Observable<object>;

	count({
		direction?: string
		entity? string,
		fromNode: string,
		max?: number,
		min?: number
	}): Observable<number>;

	delete({
		direction?: string
		entity? string,
		fromNode: string,
		toNode: string
	}): Observable<object>;

	deleteMatchingNode({
		fromNode: string
	}): Observable<object>;

	all(): Observable<object>;

	allMatchingNode({
		by?: 'distance' | 'timestamp',
		direction?: string
		entity? string,
		fromNode: string,
		toNode: string,
		noInverse?: boolean,
		onlyNodes?: boolean
	}): Observable<object>;

	closest({
		desc?: boolean,
		direction?: string
		distance?: [min?: number, max?: number],
		entity? string,
		filter? string,
		fromNode: string,
		limit: [min?: number, max?: number],
		timestamp: [min?: number, max?: number]
	}): Observable<object>;

	link({
		absoluteDistance?: number,
		direction?: string
		distance?: number,
		entity? string,
		fromNode: string,
		noTimestamp?: boolean,
		toNode: string
	}): Observable<object>;

	traverse({
		concurrency?: number,
		jobs: Array<{
			absoluteDistance?: number,
			direction?: string
			distance?: number,
			entity? string,
			fromNode: string,
			noTimestamp?: boolean,
			toNode: string
		}>,
		maxPath: number,
		minPath: number,
		remoteClosest: function,
		remoteClosestIndex: number
	}): Observable<object>;

Sample

	const Redis = require('smallorange-redis-client');
	const {
		Edge,
		Node
	} = require('smallorange-redis-edge-graph');

	class App {
		constructor() {
			const redis = new Redis({
				connection: {
					port: 6380
				}
			});

			this.redis = redis;
			this.namespace = 'graph-1';
			
			this.node = new Node({
				namespace: 'graphName',
				redis
			});

			this.edge = new Edge({
				namespace: 'graphName',
				node: this.node,
				redis
			});
		}
	}

FAQs

Package last updated on 05 Oct 2017

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