Registry / database / deepbase-redis

deepbase-redis

JSON →
library3.6.9jsnpmunverified

Vanilla Redis driver for DeepBase (v3.6.9) that stores nested objects as JSON strings in Redis using standard string operations. Works with any Redis installation without modules. Maintained by the DeepBase team with regular releases. Alternatives: deepbase-redis-json for atomic JSON path operations (requires Redis Stack).

npm install deepbase-redis
INSTALL
IMPORT
SIG · DEEPBASE-REDIS
D
deepbase-redis
databasejavascriptv3.6.9
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.

RedisDriver
import RedisDriver from 'deepbase-redis'
const RedisDriver = require('deepbase-redis')
ESM default export. CJS require works but not recommended. TypeScript types included.
DeepBase
import DeepBase from 'deepbase'
import { DeepBase } from 'deepbase'
DeepBase is a default export, not named.
RedisDriverOptions
import type { RedisDriverOptions } from 'deepbase-redis'
import { RedisDriverOptions } from 'deepbase-redis'
Type import only (TypeScript). Not a runtime value.

Initializes DeepBase with RedisDriver, sets and gets a nested object, increments a counter, and disconnects.

import DeepBase from 'deepbase'; import RedisDriver from 'deepbase-redis'; const db = new DeepBase(new RedisDriver({ url: process.env.REDIS_URL ?? 'redis://localhost:6379', prefix: 'myapp' })); await db.connect(); // Set nested key await db.set('users', 'alice', { name: 'Alice', age: 30 }); // Get nested key const alice = await db.get('users', 'alice'); // Increment counter await db.inc('stats', 'pageViews', 1); // Disconnect await db.disconnect();
Debug
Known issues
breakingIn v3, the constructor no longer accepts a 'name' option for key prefix; use 'prefix' instead.
fix
Use 'prefix' option instead of 'name' in RedisDriver constructor.
affects: >=3.0.0 <3.0.0
gotchaEntire objects are read and written for nested path operations (set/get with 3+ arguments). Inefficient for large nested objects.
fix
Use deepbase-redis-json driver for atomic JSON path operations.
affects: *
deprecatedRedisDriver option 'nidAlphabet' and 'nidLength' are deprecated and will be removed in v5.
fix
Remove those options; they are no longer used.
affects: >=3.5.0
gotchaRedis connection errors are not automatically retried. You must implement reconnection logic or use a Redis client with built-in retry.
fix
Wrap connection in retry logic or use ioredis driver instead.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'deepbase-redis'
Package not installed or missing from node_modules.
fix
Run 'npm install deepbase deepbase-redis' to install both packages.
TypeError: DeepBase is not a constructor
Incorrect import of DeepBase (named import instead of default).
fix
Use 'import DeepBase from 'deepbase'' (default import).
RedisDriver is not defined
Using CommonJS require without proper assignment.
fix
Use 'const RedisDriver = require('deepbase-redis').default' or switch to ESM import.
Upgrade
Version history
3.6.9latest on npm
Audit
Dependencies
deepbaserequiredPeer dependency required to instantiate DeepBase database
Agent activity
4 hits · last 30 days
node
4
Resources
deepbase-redis — npm install deepbase-redis · libregistry