@lakutata-component/datastore
v1.0.35
Published
Lakutata Datastore Component
Downloads
18
Readme
Quickstart
Step 1: Configure datastore component
const app = await createApp({
id: 'test.app',
name: 'tester',
components: {
datastore: {
class: DatastoreComponent,
dataDir: path.resolve(__dirname, '../../data')
}
}
})
Step 2: Get datastore component
const datastore: Datastore = app.Components.get<DatastoreComponent>('datastore')
Step 3: Use it
await datastore.insert(metaData, dataObject)
await datastore.find(metaData, {
conditions: {test: {$eq: true}},
from: new Date(),
to: new Date(),
skip: 0,
limit: 128,
sort: {test: 'ASC'}
})
await datastore.list(metaData)
@lakutata/core required.
How to Contribute
Please let us know how can we help. Do check out issues for bug reports or suggestions first.