dcp/jnu
Jnu is a RESTful database connector for the “Jnu” back-end services that sit in front of the scheduler, portal, and px-auth’s databases. It provides a signed, permission-checked query interface (based on ormdb’s query model) without exposing raw database credentials to clients.
Classes
Most applications only need connect, which returns a Connection already loaded with the target service’s database schema.
Example
const jnu = require('dcp/jnu');
const db = await jnu.connect('scheduler');
const result = await db.select({
table: 'jobs',
prototype: { owner: myAddress.toString() },
limit: 20,
order: 'startTime',
desc: true,
});
await result.rows.forEach((row) => console.log(row));