///
import { DBUpdate } from './typings';
export interface TectonicResponse {
success: boolean;
data: string;
}
export declare type SocketMsgCb = (res: TectonicResponse) => void;
export interface SocketQuery {
message: string;
cb: SocketMsgCb;
onError: (err: any) => void;
}
export default class TectonicDB {
port: number;
address: string;
socket: any;
initialized: boolean;
dead: boolean;
private onDisconnect;
private socketSendQueue;
private activeQuery?;
private readerBuffer;
constructor(port?: number, address?: string, onDisconnect?: (queue: SocketQuery[]) => void);
init(): Promise;
info(): Promise;
ping(): Promise;
help(): Promise;
add(update: DBUpdate): Promise;
insert(update: DBUpdate, db: string): Promise;
getall(): Promise;
get(n: number): Promise;
clear(): Promise;
clearall(): Promise;
flush(): Promise;
flushall(): Promise;
create(dbname: string): Promise;
use(dbname: string): Promise;
exists(dbname: string): Promise;
handleSocketData(data: Buffer): void;
sendSocketMsg(msg: string): void;
cmd(message: string | string[]): Promise;
exit(): void;
getQueueLen(): number;
concatQueue(otherQueue: SocketQuery[]): void;
}