db service: Count endpoint (#236)

This commit is contained in:
Janos Dobronszki
2021-10-21 09:35:51 +01:00
committed by GitHub
parent 36b705930f
commit 2b6a219b0e
13 changed files with 384 additions and 118 deletions

View File

@@ -0,0 +1,12 @@
import * as db from "m3o/db";
// Count records in a table
async function CountEntriesInAtable() {
let dbService = new db.DbService(process.env.MICRO_API_TOKEN);
let rsp = await dbService.count({
table: "users",
});
console.log(rsp);
}
await CountEntriesInAtable();