Registry / database / jugglingdb-redis

jugglingdb-redis

JSON →
library0.0.2-2jsnpmunverified

Redis adapter for JugglingDB (v0.0.2-2), a legacy ORM-like database abstraction layer for Node.js. This package allows JugglingDB to connect to Redis as a backend. It is extremely outdated (last release in 2012), uses `jugglingdb@0.2.x`, and relies on a Redis server on default port. No active development or maintenance. Not recommended for new projects; use modern alternatives like ioredis or redis-om.

npm install jugglingdb-redis
INSTALL
IMPORT
SIG · JUGGLINGDB-REDIS
J
jugglingdb-redis
databasejavascriptv0.0.2-2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Schema
var Schema = require('jugglingdb').Schema;
import { Schema } from 'jugglingdb';
JugglingDB is CommonJS only; no ESM support. Use require.
jugglingdb-redis (adapter)
var schema = new Schema('redis');
const schema = new Schema('jugglingdb-redis');
The adapter is invoked by passing the string 'redis' to the Schema constructor, not the package name.
Package require
require('jugglingdb-redis');
import 'jugglingdb-redis';
The adapter must be required in code for it to register (though registering via schema is typical).

Shows basic usage: create a Redis-backed schema and define a model with jugglingdb-redis adapter.

var Schema = require('jugglingdb').Schema; var schema = new Schema('redis'); var List = schema.define('List', { name: String }); List.create({name: 'my list'}, function(err, list) { console.log(list.id); });
Debug
Known issues
breakingjugglingdb-redis is incompatible with jugglingdb versions other than 0.2.x
fix
Use jugglingdb@0.2.x or migrate to loopback-datasource-juggler with loopback-connector-redis.
affects: >=0.3.0
deprecatedjugglingdb-redis has been archived and is no longer maintained. Use loopback-connector-redis instead.
fix
Switch to @loopback/loopback-connector-redis or a modern Redis ORM.
affects: >=0.0.0
gotchaRunning tests will delete all data in Redis database 0 without warning.
fix
Do not run npm test on a production Redis instance; use a dedicated test database.
affects: 0.0.2-2
gotchaThe adapter requires a Redis server running on localhost:6379 with no authentication by default.
fix
Configure Redis connection via environment variables or modify the adapter source.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'jugglingdb'
jugglingdb is not installed as a dependency.
fix
Run: npm install jugglingdb@0.2.x
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
Redis server is not running or not accessible.
fix
Start Redis server: redis-server
TypeError: Schema is not a constructor
Incorrect import of Schema from jugglingdb (e.g., using destructuring).
fix
Use: var Schema = require('jugglingdb').Schema;
Error: Cannot find module 'redis'
The 'redis' npm package is not installed (jugglingdb-redis depends on it).
fix
Install redis: npm install redis@0.10.0 (compatible version)
Upgrade
Version history
0.0.2-2latest on npm
Audit
Dependencies
jugglingdbrequiredPeer dependency: requires jugglingdb@0.2.x to function
redisrequiredTransitive dependency: jugglingdb-redis depends on the `redis` npm package for Redis client connectivity
Agent activity
4 hits · last 30 days
node
4
Resources
jugglingdb-redis — npm install jugglingdb-redis · libregistry