ServerRepository

Repository for server-side data retrieve. Implement ServerRepository#select method able to return initialized TubDataStore

Usually created using UB.Repository function.

Author:
  • pavel.mash
Example
var store = UB.Repository('my_entity').attrs('id')
      .where('code', 'in', ['1', '2', '3'])  // code in ('1', '2', '3')
      .where('name', 'contains', 'Homer'). // name like '%homer%'
      .where('birtday', 'geq', new Date()).where('birtday', 'leq', new Date() + 10) //(birtday >= '2012-01-01') AND (birtday <= '2012-01-02')
      .where('[age] -10', '>=', {age: 15}, 'byAge') // (age + 10 >= 15)
      .where('', 'match', 'myvalue'). // perform full text search for entity (fts mixin must be configured for entity)
      .logic('(byStrfType OR bySrfKindID)AND(dasdsa)')
      .select();

Extends

Classes

ServerRepository