user redis
This commit is contained in:
@ -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);
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user