Skip to content

WisnuDS/json2sequelize-clause

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json2sequelize-clause

Description

This module or package is used to convert json format into a clause where sequelize. This makes it easier for you to create dynamic filter formats

Getting Started

Installing

npm i json2sequelize-clause

Executing program

You can import library and use it for convert json to sequelize where clause

const User = require('./config')
const convert = require('json2sequelize-clause')

const clause = [
  {
      "column": "name",
      "function_name": "contains",
      "value": "Farcha",
      "operator": "where"
  },
  {
      "column": "age",
      "function_name": ">",
      "value": 21,
      "operator": "or"
  }
]

User.findAll({
    where: convert(clauses.does_not_contains)
}).then(results => {
    console.log(results)
})

For more example clause you can access here

Authors

Version History

  • 1.0.3
    • Update structure and recursive strategy
  • 1.0.2
    • Update documentation in README.md
  • 1.0.1
    • Update some attributes
    • Create some test cases
    • See commit change
  • 1.0.0
    • Initial Release

License

This project is licensed under the ISC License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published