user redis

This commit is contained in:
2020-04-12 19:19:36 -04:00
parent 64444a6d32
commit ab108ebec8
11 changed files with 728 additions and 11 deletions

View File

@ -88,6 +88,7 @@ table.add = async function(data){
try{
// Validate the passed data by the keyMap schema.
data = objValidate.processKeys(this._keyMap, data);
// Do not allow the caller to overwrite an existing index key,
@ -176,15 +177,21 @@ table.remove = async function(data){
}
};
table.createInstance = function(data){
// this.__proto__ = data;
return this
}
function Table(data){
// Create a table instance.
let obj = Object.create(table);
// Insert the user assigned options
Object.assign(obj, data);
let instance = Object.create(data);
Object.assign(instance, table);
// Return the table instance to the caller.
return obj;
return Object.create(instance);
};