loopback-datasource-juggler-paginate
Loopback Datasource Juggler plugin that adds findPaginate to model
Last updated 6 years ago by faceleg .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install loopback-datasource-juggler-paginate 
SYNC missed versions from official npm registry.

loopback-datasource-juggler-paginate

Loopback Datasource Juggler plugin that adds findPaginate method to Model.

Currently expects query params as given by [ng-table], and provides an object intended to be used by the same.

Usage

/**
  *
  * @param {Object} Query params
  * @param {[Object]} Optional query to be lodash.extend'ed onto the pagination query
  * @return {Promise}
  */
Model.findPaginate(req.query, {
  where: {
    status: {
      neq: 'Deleted'
    }
  }
}).then(function(models) {
  console.log(models);
});

[1] https://github.com/esvit/ng-table

Current Tags

  • 0.0.2                                ...           latest (6 years ago)

2 Versions

  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |