Think in documents.
Use familiar MongoDB-style operations, indexes and aggregation pipelines.
Insert, find, update
These examples use mongosh against a running local Mammoth server. They are illustrative code, not an interactive database connection.
documents.js
db.projects.insertOne({
name: "Atlas", language: "Go", active: true
});
db.projects.find({ language: "Go" });
db.projects.updateOne(
{ name: "Atlas" },
{ $set: { active: false } }
);Give queries a useful index
indexes.js
db.projects.createIndex({ name: 1 }, { unique: true });
db.sessions.createIndex(
{ expiresAt: 1 },
{ expireAfterSeconds: 0 }
);The source documents single-field, compound, text, geospatial and TTL indexes. Confirm index behavior for the exact data types and query operators you use.
Build a pipeline
aggregation.js
db.projects.aggregate([
{ $match: { active: true } },
{ $group: {
_id: "$language",
projects: { $sum: 1 }
} },
{ $sort: { projects: -1 } }
]);Compatibility has a boundary.
The full MongoDB aggregation operator set remains a roadmap item in the project README. Read the API reference and test your actual pipeline instead of assuming every operator is implemented.
Grounded in the upstream source · snapshot 6b186803 · reviewed 19 October 2026.
API reference Wire commands Tutorials