Skip to content

Latest commit

 

History

History
101 lines (72 loc) · 2.21 KB

API.md

File metadata and controls

101 lines (72 loc) · 2.21 KB

Classes

DataOp
Table

Members

loadData

Load initial data into state

Functions

Session()

Interface for retreiving relational data from the store.

Session instance is passed to the reducer functions annotated with @data. Each

data()

Mark reducer action impl as data, so it would be wrapped in restore.Sesssion call To be used with actionObject

ActionObject should have item name data

DataOp

Kind: global class

new DataOp(type, table, fields)

Instances of this type will be sent server side to sync backend model

Param Type Description
type string Operation type, one of CREATE, UPDATE, DELETE
table string name
fields Object for the operation

Table

Kind: global class

new Table(rows, tableName)

Provides access to entities of specific type in a session.

Instances of Table are constructed on session start. Entities retreived via Table are flushed on session end.

Param Type Description
rows Array from the store state
tableName string

Table~commit()

Return updated data

Kind: inner method of Table

loadData

Load initial data into state

Kind: global variable

Session()

Interface for retreiving relational data from the store.

Session instance is passed to the reducer functions annotated with @data. Each

Kind: global function

data()

Mark reducer action impl as data, so it would be wrapped in restore.Sesssion call To be used with actionObject

ActionObject should have item name data

Kind: global function