How to use the orm.ne function in orm

To help you get started, we’ve selected a few orm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gomeplusFED / DataPlatform / models / select.js View on Github external
module.exports.userFindAll = function(params, func) {
  var start = parseInt(params.start),
    end = parseInt(params.end),
    offset = end - start,
    model = params.model;

  var findParams = {
    is_admin: orm.ne('99')
  };
  if (params.query) {
      findParams.username = orm.like('%' + params.query + '%');
  }
  model.Users.count(findParams, function(err, count) {
    if (err) {
      func(err);
    } else {

      model.Users.find(findParams, {
        offset: start,
        limit: offset
      }, function(err, items) {
        if (err) {
          func(err);
        } else {

orm

NodeJS Object-relational mapping

MIT
Latest version published 10 months ago

Package Health Score

67 / 100
Full package analysis