1.1.1 • Published 4 years ago

ex-objection-model v1.1.1

Weekly downloads
11
License
MIT
Repository
github
Last release
4 years ago

Extended Objection Query Builder

An extended model for Objection.js.
This package adds extra methods to the Objection.js query builder.

What it includes

Installation

npm install ex-objection-model

or

yarn add ex-objection-model

How to use

Just require the package in your model and then extends the BaseModel class.
Example:

const { BaseModel } = require('ex-objection-model');

class User extends BaseModel {
  static tableName() {
    return 'user';
  }
}

User.whereLike(['name'], 'john'); // whereLike provided by extending BaseModel