hipstina / u3_cheatsheet_sequelize

This repo is a handy cheatsheet for all things Sequelize.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sequelize Cheats

Getting Started

  • npm install
  • npm run setup

1. Queries

Everything you need for queries is here. Run npm run queries to see the output from each query. All the queries are listed in the index.js file in queries-1.

2. Associations

Simple one-to-many associations are here. Run npm run associations to see the output from the queries and how the information comes back. All queries are listed in the index.js file in associations-2. Look at the models to see how simple associations are performed.

3. Complex Associations

More complex associations are performed here. Includes everything from basic associations to many-many associations using through tables. Run npm run associations-complex to see the output.

4. Model Helpers

In this section you'll find model helpers, validations and model getter and setters are here. Run npm run model-helpers to view the output.

About

This repo is a handy cheatsheet for all things Sequelize.


Languages

Language:JavaScript 100.0%