Новый движок БД

This commit is contained in:
Book Pauk
2021-11-24 14:15:09 +07:00
parent 609334c5a6
commit 0b6a726503
14 changed files with 4065 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
class TableRowsMem {
constructor() {
this.rows = new Map();
}
//--- rows interface
async getRow(id) {
return this.rows.get(id);
}
setRow(id, row) {
this.rows.set(id, row);
}
deleteRow(id) {
this.rows.delete(id);
}
getAllIds() {
return this.rows.keys();
}
getAllIdsSize() {
return this.rows.size;
}
//--- rows interface end
async destroy() {
//for GC
this.rows = null;
}
}
module.exports = TableRowsMem;