nestjs-sequelize-query-parser
v1.0.1
Published
Query parser for Nest.js Sequelize
Downloads
9
Readme
Sequelize query string parser for nest.js
parse incoming query string to valid sequelize options:
examples:
- limit and offset:
?limit=1&&offset=2
- ordering
?order=name,age?DESC
conveted to
{
order:[[name,age], DESC]
}
- Where Options
?filter=age.gt.2^name.contains.test
converted to
{
age: {
[Op.gt]:2
},
name:{
[Op.contains]:'test'
}
}