1.0.1 • Published 2 years ago

nestjs-sequelize-query-parser v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Sequelize query string parser for nest.js

parse incoming query string to valid sequelize options:

examples:

  1. limit and offset: ?limit=1&&offset=2
  2. ordering ?order=name,age?DESC conveted to
{
 order:[[name,age], DESC]
}
  1. Where Options ?filter=age.gt.2^name.contains.test converted to
{
 age: {
 [Op.gt]:2
 },
 name:{
  [Op.contains]:'test'
 }
}