import Adapter from "./Adapter"; import { Table } from "../model"; /** * An adapter for JabDB that uses a single file as the source, * and uses aync methods * @extends Adapter */ export declare class SingleFileAdapter extends Adapter { private source; private requireJSONFile; /** * Creates an instance of SingleFileAdapter. * @param {string} source The path of the source file * @param {boolean} requireJSONFile Whether to require the file to * be a .json file (``true`` by default) */ constructor(source: string, requireJSONFile?: boolean); /** @inheritdoc */ connect(): Promise; /** * Checks that the source file exists, and is a .json file * @private * @returns {Promise} * @memberof SingleFileAdapter */ private checkSource; /** * Reads the source file and returns the data as a {@link Database} object */ private readSource; /** * Writes data to the source file * @param database The data to write as a {@link Database} object */ private writeSource; /** * Get a table from the database source * @param id The id of the table to get * @returns {Promise} The table as a {@link Table} object. */ getTable(id: string): Promise
; /** * Save a table to the database. If a table with the same id exists, it will be overridden. * @param table The table to save in the database. */ saveTable(table: Table): Promise; deleteTable(id: string): Promise; }