import { ICollectionConfig } from './async/ICollectionConfig'; import { IDataCollection } from './async/IDataCollection'; import { Item } from './types/Item'; import { IndexDef } from './types/IndexDef'; export type TransactionOptions = {}; export interface CSTransaction { startTransaction(options: TransactionOptions): Promise; abortTransaction(): Promise; commitTransaction(): Promise; endSession(): Promise; } export declare class CSDatabase implements CSTransaction { private root; private name; private inTransaction; private collections; constructor(root: string, name?: string); private writeSchema; connect(): Promise; load(): Promise; close(): Promise; collectionList: Map>; private registerCollection; createCollection(name: string): Promise>; listCollections(): Array>; dropCollection(name: string): Promise; collection(name: string): IDataCollection | undefined; createIndex(collection: string, name: string, def: IndexDef): Promise; dropIndex(collection: string, name: string): Promise; persist(): Promise; startSession(): Promise; endSession(): Promise; startTransaction(options: TransactionOptions): Promise; abortTransaction(): Promise; commitTransaction(): Promise; first(collection: string): Promise; last(collection: string): Promise; lowest(collection: string, key: string): Promise; greatest(collection: string, key: string): Promise; oldest(collection: string): Promise; latest(collection: string): Promise; findById(collection: string, id: any): Promise; findBy(collection: string, key: string, id: any): Promise; findFirstBy(collection: string, key: string, id: any): Promise; findLastBy(collection: string, key: string, id: any): Promise; }