0.2.2 • Published 8 months ago

@nebula-db/plugin-sync v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@nebula-db/plugin-sync

Synchronization plugin for NebulaDB

Part of the NebulaDB project - a high-performance, reactive, TypeScript-first, schema-optional, embeddable NoSQL database.

Installation

npm install @nebula-db/plugin-sync

Usage

import { createDb } from '@nebula-db/core';
import { MemoryAdapter } from '@nebula-db/adapter-memory';
import { createSyncPlugin } from '@nebula-db/plugin-sync';

// Create the plugin
const syncPlugin = createSyncPlugin();

// Create a database with the plugin
const db = createDb({
  adapter: new MemoryAdapter(),
  plugins: [syncPlugin]
});

// Use the database with the plugin
const users = db.collection('users');
await users.insert({ name: 'Alice', age: 30 });

Documentation

For full documentation, visit the NebulaDB GitHub repository.

License

MIT