Repository
Current version released
4 years ago
Versions
AloeDB
Light, Embeddable, NoSQL database for Deno
Work in progress!
Features
- β¨ Simple to use API, similar to MongoDB!
- π Easily integrates with Oak, Superstruct, Nano ID, etc.
- π Optimized for a large number of operations.
- β No dependencies, even without std!
- π Stores data in readable JSON file.
Example
import { Database } from 'https://deno.land/x/aloedb/mod.ts'
// Structure of stored documents
interface Film {
title: string;
year: number;
genres: string[];
authors: { director: string };
}
// Initialization
const db = new Database<Film>('./path/to/the/file.json');
// Insert operations
await db.insertOne({
title: 'Drive',
year: 2012,
genres: ['crime', 'drama', 'noir'],
authors: { director: 'Nicolas Winding Refn' }
});
// Search operations
const found = await db.findOne({ title: 'Drive', film: true });
// Update operations
await db.updateOne({ title: 'Drive' }, { year: 2011 });
// Delete operations
await db.deleteOne({ title: 'Drive' });
P.S: More example can be found here!