APIs

Show:

Library to access entity objects and collections from JS.

Constructor

flexygo.obj.Entity

(
  • objectName
  • [objectWhere]
)
Object

Parameters:

  • objectName String
    • The object name.
  • [objectWhere] String optional
    • Where condition (only if object isn't new).

Returns:

Object:
  • Entity object.

Methods

delete

() Boolean

Delete current object.

Returns:

Boolean:
  • Success or fail.

getConfig

() Object

Get the system configuration related to current object.

Returns:

Object:
  • System configuration

getTemplateByType

(
  • templateType
  • [cllback]
)
flexygo.api.Template

Get object template by type

Parameters:

  • templateType String
    • Desired template type.
  • [cllback] Function optional
    • function to get the results, if null, get view will be syncronous and results will be returned on return param.

Returns:

flexygo.api.Template:
  • if no cllback param, results object

getTemplateByType

(
  • getTemplateById
  • [cllback]
  • [filter]
)
flexygo.api.Template

Get object template by id

Parameters:

  • getTemplateById String
    • Desired template id.
  • [cllback] Function optional
    • function to get the results, if null, get view will be syncronous and results will be returned on return param.
  • [filter] String optional
    • Additional where to filter the template.

Returns:

flexygo.api.Template:
  • if no cllback param, results object

getView

(
  • viewName
  • [page=0]
  • [pageSize=5000]
  • [filter]
  • [orderBy]
  • [cllback]
)
Object

Get the system configuration related to current object.

Parameters:

  • viewName String
    • Desired view name.
  • [page=0] Number optional
    • Page number.
  • [pageSize=5000] Number optional
    • Number of page elements.
  • [filter] String optional
    • Additional sql where.
  • [orderBy] String optional
    • Order by condition.
  • [cllback] Function optional
    • function to get the results, if null, get view will be syncronous and results will be returned on return param.

Returns:

Object:
  • if no cllback param, results object

getViewColumnsNames

(
  • viewName
  • [cllback]
)
Object

Get view columns names.

Parameters:

  • viewName String
    • Desired view name.
  • [cllback] Function optional
    • function to get the results, if null, get view will be syncronous and results will be returned on return param.

Returns:

Object:
  • results object

getViewCount

(
  • viewName
  • [filter]
  • [orderBy]
  • [cllback]
)
Number

Get number of rows.

Parameters:

  • viewName String
    • Desired view name.
  • [filter] String optional
    • Additional sql where.
  • [orderBy] String optional
    • Order by condition.
  • [cllback] Function optional
    • function to get the results, if null, get view will be syncronous and results will be returned on return param.

Returns:

Number:
  • if no cllback param, results object

insert

() Boolean

Save a new item in the database.

Returns:

Boolean:
  • Success or fail.

processes

(
  • options
)
flexygo.api.entity.GetProcessesResponse

Get the processes related to current object.

Parameters:

  • options String
    • leave empty for all processes. reports for only reports, processes for only processes and relations only for relations

Returns:

read

() Boolean

Init entity and recive the values.

Returns:

Boolean:
  • Success or fail.

toValuesArray

() String

Converts Data properties in KeyValuePair array.

Returns:

String:
  • Data array

update

() Boolean

Save changes in the database.

Returns:

Boolean:
  • Success or fail.