fastify-objectionjs-classes
v0.1.1
Published
Objection.js plugin for Fastify with classes cherry-picking support
Downloads
3
Readme
fastify-objectionjs-classes
Cherry-pick Objection.js classes for Fastify, complements fastify-objectionjs.
Decorator namespace is
objectionjs
Install
npm i fastify-objectionjs-classes --save
Usage
const fastify = require('fastify')();
const objectionJsClasses = require('fastify-objectionjs-classes');
fastify.register(objectionJsClasses, {
classes: ['transaction', 'fn', 'snakeCaseMappers', 'ref'],
});
// somehwere in your code
.whereIn(fastify.objectionjs.ref('testColumn').castText()) ,'testValue');
API
Options
fastify-objectionjs-classes accepts the options object:
{
classes: [ClassName];
}
classes
(Default:undefined
): a collection of objectionjs classes.
License
Licensed under MIT.