Readonly storageReadonly typeusing lock(), guard func with auto lock & release.
const res = await storage.guard(async ()=>{
return 'abc';
});
// res === 'abc'
Optional tick: numberOptional interval: numberupdate model (or it will create automatically)
//before: { count: 1 };
const res = await storage.increment(1, { count: 2 }, { total: 2 });
//after : { count: 3, total: 2 }
node-id
model only with numbers
Optional $update: Tlock data-entry by type+id w/ limited time tick
release(id)total-waited-time = tick * interval (msec)
[UPDATES]
model-id to lock
Optional tick: numbertick count to wait.
Optional interval: numbertimeout interval per each tick (in msec, default 1000 = 1sec)
make GeneralAPIController for REST API w/ supporting basic CRUD
Optional search: Elastic6SimpleQueriable<any>Optional uniqueField: stringmake UniqueFieldManager for field.
save model by checking origin node.
doSave() rather than doUpdate() for both create & update.$create is null, throw 404 error it if not found.node-id
Optional $create: T(optional) initial creation model.
Generated using TypeDoc
class:
TypedStorageService