Skip to content

marceloampuero/sequelize

 
 

Repository files navigation

Sequelize Bitdeli Badge Build Status Dependency Status Flattr this

MySQL, MariaDB, PostgresSQL, and SQLite Object Relational Mapper (ORM) for node.

Install

To install 1.x.x (currently 1.7.x) - which has a stable API and is backwards compatible:

npm install sequelize

To install 2.x.x branch - which has a unstable API and will break backwards compatability:

npm install sequelize@unstable

Resources

Important Notes

2.0.0

There is a parallel "branch" of the project, released as 2.0.0-alphaX in NPM. All those releases are based on the master and will get all the changes of the master. However, 2.0.0 will contain backwards compatibility breaking changes. Check the changelog of the branch: https://github.com/sequelize/sequelize/blob/milestones/2.0.0/changelog.md

2.0.0 API should be considered unstable

1.6.0

  • We changed the way timestamps are handled. From v1.6.0 on timestamps are stored and loaded as UTC.
  • Support for synchronous migrations has been dropped. up and down methods in migrations do have a third parameter which is the callback parameter. Pass an error or an error message as first parameter to the callback if something went wrong in the migration.

Blogposts/Changes

  • v1.6.0 Eager loading, support for enums, decimals and bigint, performance improvements …
  • v1.4.1: deprecation of node < 0.6, logging customization, ...
  • v1.4.0: postgresql, connection pooling, ...
  • v1.3.0: migrations, cross-database, validations, new listener notation, ...
  • v1.2.1: changes some defaults and some interfaces
  • v1.0.0: complete rewrite

Features

  • Schema definition
  • Schema synchronization/dropping
  • Easy definition of class/instance methods
  • Instance saving/updating/dropping
  • Asynchronous library
  • Associations
  • Importing definitions from single files
  • Promises
  • Hooks/callbacks/lifecycle events

Documentation and Updates

You can find the documentation and announcements of updates on the project's website. If you want to know about latest development and releases, follow me on Twitter. Also make sure to take a look at the examples in the repository. The website will contain them soon, as well.

Running Examples

Instructions for running samples are located in the example directory. Try these samples in a live sandbox environment:

About

Sequelize is an easy-to-use multi sql dialect object-relationship-mapper for node.js. It currently supports MySQL, MariaDB, SQLite and PostgreSQL.

Resources

License

Stars

Watchers

Forks

Packages

No packages published