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'],
});
.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.