desi-mongoose
v0.2.0
Published
A fun and intuitive MongoDB ODM for Node.js with a Hinglish twist
Maintainers
Readme
Desi Mongoose Documentation
Welcome to Desi Mongoose - a fun and intuitive MongoDB ODM for Node.js that brings a Hinglish twist to database operations! 🚀
Table of Contents
Installation
npm install desi-mongooseQuick Start
import { DesiModel, DesiSchema } from 'desi-mongoose';
// Define a schema
const userSchema = new DesiSchema({
name: { type: String, required: true },
age: { type: Number, min: 0 },
email: { type: String, unique: true }
});
// Create a model
const User = new DesiModel('User', userSchema);
// Create a new user
await User.nayaBanao({
name: 'Raj Kumar',
age: 25,
email: '[email protected]'
});
// Find users
const users = await User.dhoondo({ umar: { $gt: 18 } });Core Features
- Schema definition with validation
- Model creation and operations
- Create (nayaBanao)
- Read (dhoondo, ekDhoondo)
- Update (badlo)
- Delete (hatao)
- Complex data pipeline operations
- Hinglish-named aggregation methods
- Define and manage relationships
- Population and references
- Built-in validators
- Custom validation rules
- Pre and post hooks
- Middleware functions
- Plugin system
- Extending functionality
- ACID transactions
- Session management
- Query result caching
- Cache management
Documentation
Detailed documentation for each feature is available in separate files:
- Schema and Model Documentation
- CRUD Operations Guide
- Aggregation Pipeline Guide
- Relationships Guide
- Validation Rules
- Events and Middleware
- Plugin System
- Transaction Management
- Cache Management
Contributing
We welcome contributions! Please feel free to submit a Pull Request.
License
MIT
