Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Store

base class to build a custom data store.

Hierarchy

Hierarchy-Diagram

Index

Constructors

constructor

  • new Store(options?: any): Store
  • Parameters

    • Optional options: any

    Returns Store

Properties

_type

_type: string

endpoints

endpoints: any

Protected entities

entities: any

isCollection

isCollection: boolean

isModel

isModel: boolean

isStore

isStore: boolean

Protected name

name: string

Protected trigger

trigger: trigger

Methods

close

  • close(): void
  • Returns void

create

destroy

  • destroy(model: Model, options?: ModelDestroyOptions): void
  • Parameters

    • model: Model
    • Optional options: ModelDestroyOptions

    Returns void

fetch

  • fetch(collection: Model, options: ModelFetchOptions): Promise<any>
  • fetch(collection: Collection, options: CollectionFetchOptions): Promise<any>
  • Parameters

    • collection: Model

      usually a collection, but can also be a model

    • options: ModelFetchOptions

    Returns Promise<any>

  • Parameters

    • collection: Collection

      usually a collection, but can also be a model

    • options: CollectionFetchOptions

    Returns Promise<any>

Protected handleError

  • handleError(options: object, error: Error): any
  • Parameters

    • options: object
    • error: Error

    Returns any

Protected handleSuccess

  • handleSuccess(options: object, result: any): any
  • Parameters

    • options: object
    • result: any

    Returns any

initCollection

  • initCollection(collection: Collection, options?: any): void
  • Parameters

    Returns void

initModel

  • initModel(model: Model, options?: any): void
  • Parameters

    • model: Model
    • Optional options: any

    Returns void

save

  • save(model: Model, attributes?: any, options?: ModelSaveOptions): any
  • Parameters

    • model: Model
    • Optional attributes: any
    • Optional options: ModelSaveOptions

    Returns any

sync

  • sync(method: string, model: Model | Collection, options?: any): Promise<any>
  • Parameters

    Returns Promise<any>

Generated using TypeDoc