@nebula-db/plugin-versioning
Version:
Document versioning plugin for NebulaDB
41 lines (27 loc) • 976 B
Markdown
# @nebula-db/plugin-versioning
Document versioning plugin for NebulaDB
Part of the [NebulaDB](https://github.com/Nom-nom-hub/NebulaDB) project - a high-performance, reactive, TypeScript-first, schema-optional, embeddable NoSQL database.
## Installation
```bash
npm install @nebula-db/plugin-versioning
```
## Usage
```typescript
import { createDb } from '@nebula-db/core';
import { MemoryAdapter } from '@nebula-db/adapter-memory';
import { createVersioningPlugin } from '@nebula-db/plugin-versioning';
// Create the plugin
const versioningPlugin = createVersioningPlugin();
// Create a database with the plugin
const db = createDb({
adapter: new MemoryAdapter(),
plugins: [versioningPlugin]
});
// 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](https://github.com/Nom-nom-hub/NebulaDB).
## License
MIT