Napoleonic Political Magnificence
Wondering what’s next for npm?Check out our public roadmap! »

@puzzleframework/repository

2.0.11 • Public • Published

Puzzle Framework Database Repository Module

A unified method to access database using class criteria.

To use this module, add the "@puzzleframework/repository" in your application "package.json" under the "puzzles" property as up as possible in the list. It will load automatically the repository class loader.

A repository will provide you with the following things:

  • Simplified database querying using criteria classes - no code duplication
  • Managed create, update, delete actions using criteria classes
  • Paginated data
  • Data validation system

Whenever you want to define a repository class, you will have to import and extend the RepositoryBase class.

Whenever you want to define a criteria class, you will have to import and extend the Criteria/CriteriaBase class. We have predefined a generic criteria class called IDCriteria which will create the seqeuelize query string based on an ID passed by the user.

Contributing

To contribute please read the CONTRIBUTING.md file.

Install

npm i @puzzleframework/repository

DownloadsWeekly Downloads

5

Version

2.0.11

License

SEE LICENSE IN LICENSE.md

Unpacked Size

40.7 kB

Total Files

21

Last publish

Collaborators

  • avatar