SQL Namespace


Classes


EntitiesHelper

constructor

With the help of this method you can create a new instance of EntitiesHelper.

Signature

constructor(void) : Object|EntitiesHelper

Returns

  • Object, EntitiesHelper
    • A new instance of EntitiesHelper

fetchAll

Fetch all models of the given models in parallel.

Signature

fetchAll(Array models, [Object criteria], Function callback) : void

Parameters

  • models
    • Entities to fetch
    • Type: Array
  • [criteria]
    • Criteria to use for filtering
    • Type: Object
  • callback
    • Function to call on finish
    • Type: Function

fetchGroups

Fetch all by defined groups in parallel. Example groups: [ { name: "groupName1", criteria: { where: {deleted_at: null} }, models: [ models.Product, models.Portal ] } ]

Signature

fetchGroups(Array groups, Function callback) : void

Parameters

  • groups
    • Groups to fetch
    • Type: Array
  • callback
    • Function to call on finish
    • Type: Function