import { ModelSchema } from "../../ModelSchema" ; import { Filter } from "../../filters" ; /**
 * This interface defines the API that is required
 * from any device specific storage implementation.
 * It defines an interface that a device specific implementation must support.
*/ export interface StorageAdapter { /**
     * Creates an instance of the StorageAdapter in transaction mode
     */ createTransaction ( ) : Promise < StorageAdapter > ; throws this is commit ( ) : Promise < void > ; throws this is rollback ( ) : Promise < void > ; returns this is isTransactionOpen ( ) : boolean ; param config addStore ( config ) : void ; /**
     * Create a new Stores with the given config
     */ createStores ( ) : void ; param storeName param input returns save ( storeName , input ) : Promise < any > ; param storeName param fliter returns query ( storeName , filter ? ) : Promise < any [ ] > ; param storeName param id queryById ( storeName , idField , id ) : Promise < any > ; param storeName param input param filter returns update ( storeName , input , filter ? ) : Promise < any [ ] > ; param storeName param input throws updateById ( storeName , idField , input ) : Promise < any > ; param input param storeName saveOrUpdate ( storeName , idField , input ) : Promise < any > ; param storeName param filter returns remove ( storeName , idField , filter ? ) : Promise < any [ ] > ; param storeName param id removeById ( storeName , idField , input ) : Promise < any > ; param storeName deleteStore ( storeName ) : Promise < void > ; }