ex-objection-model
v1.1.1
Published
An extended model for Objection.js
Maintainers
Readme
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-modelor
yarn add ex-objection-modelHow 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