NotDatabase
Docs
NotDatabase supports basic aggregation via the count()
function — useful for stats, metrics, and simple dashboards.
count()
Returns the number of documents in a collection.
const total = await db.users.count();
You can apply filters to count only documents matching certain criteria:
const admins = await db.users.count({
filter: {
isAdmin: true,
name: "Bertram Gilfoyle",
},
});
More aggregation functions (like sum
, avg
, etc.) will be added in the future.