"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseDB = void 0;
const tslib_1 = require("tslib");
/**
 * 数据库基类，包含基础的增删查改接口
 */
class BaseDB {
    constructor(key) {
        this.key = key;
    }
    find(field, value) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            const all = yield this.getAll();
            return all.filter((item) => item[field] === value);
        });
    }
}
exports.BaseDB = BaseDB;
