mongo_dart
0.10.10, released 6 weeks ago by an unverified publisher
MongoDB driver implemented in pure Dart for server-side applications.
What it does
Provides a server-side MongoDB driver written in pure Dart. It supports all CRUD operations, aggregation pipelines, authentication methods, and secure TLS/SSL connections.
AI-written summary of version 0.10.10, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Dart or Flutter server-side application that needs to connect to MongoDB.
- You require full CRUD operations, aggregation pipelines, and change streams in pure Dart.
Skip it when
- You need client-side database storage inside a mobile app (use local NoSQL/SQL solutions instead).
- You are relying on deprecated legacy commands for very old MongoDB versions without migration.
Strengths
- Implemented in pure Dart with no external native dependencies.
- Supports modern MongoDB protocol operations (OP_MSG), bulk writes, and aggregation pipelines.
- Compatible with cloud services like MongoDB Atlas and Azure DocumentDB.
Weaknesses
- Not suitable for client-side mobile storage directly due to server-side architectural design.
- Porting of all modern MongoDB commands is still a work in progress.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 13
Add mongo_dart to your dependencies and initialize a Db connection string.
var db = Db("mongodb://localhost:27017/mongo_dart-blog");
await db.open();
var coll = db.collection('find');
await collection.find(where.eq('name', 'Tom').gt('rating', 10)).toList();Alternatives
Packages that do the same job and could replace mongo_dart.
- ioredis
Redis client for Dart with connection pooling, pub/sub, transactions, and pipelining.
74Compare - local_shared
Lightweight cross-platform secure local JSON storage for collections and documents.
71Compare
Works with
Packages commonly used together with mongo_dart: ones it builds on, ones built on it, and its own family.
- cryptomongo_dart depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- uuidmongo_dart depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- poolmongo_dart depends on itManage a finite pool of resources to control concurrent operations.
- loggingmongo_dart depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- fixnummongo_dart depends on itProvides 32‑ and 64‑bit signed fixed‑width integer types for Dart.
- decimalmongo_dart depends on itArbitrary-precision decimal arithmetic for Dart
- basic_utilsmongo_dart depends on itCommon utility classes for Strings, Dates, X509, PKCS, Cryptography and HTTP requests.
- sasl_scrammongo_dart depends on itSASL SCRAM authentication implementation in Dart supporting scram-1 and scram-256.