Demo of the-db-resources
$ npm install the-demo-resource --save
'use strict'
const theDb = require('the-db')
const { SomeResource } = require('the-demo-resource')
async function tryExample () {
let db = theDb({
dialect: 'memory'
})
db.load(class extends SomeResource {
}, 'SomeResource01')
let { SomeResource01 } = db.resources
let entity01 = await SomeResource01.create({ name: 'entity01' })
/* ... */
}
tryExample().catch((err) => console.error(err))
Property | Description | Type | Required | Unique |
---|---|---|---|---|
name |
"cly:string" |
This software is released under the MIT License.