ex-objection-model

1.1.1 • Public • Published

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

Package Sidebar

Install

npm i ex-objection-model

Weekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

8.74 kB

Total Files

13

Last publish

Collaborators

  • diegobarros0701