| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
MySQL, PostgresSQL, and SQLite Object Relational Mapper (ORM) for node.
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
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.
Instructions for running samples are located in the example directory. Try these samples in a live sandbox environment:
A very basic roadmap. Chances aren't too bad, that not mentioned things are implemented as well. Don't panic :)
I'm glad to get pull request if any functionality is missing or something is buggy. But please ... run the tests before you send me the pull request.
Still interested? Coolio! Here is how to get started:
Here comes a little surprise: You need Node.JS. In order to be a productive developer, I would recommend the latest v0.8. Also I usually recommend NVM.
Once Node.JS is installed on your computer, you will also have access to the lovely Node Package Manager (NPM).
First class citizen of Sequelize was MySQL. Over time, Sequelize began to become compatible to SQLite and PostgreSQL. In order to provide a fully featured pull request, you would most likely want to install of them. Give it a try, it's not that hard.
If you are too lazy or just don't know how to get this work, feel free to join the IRC channel (freenode@#sequelizejs).
For MySQL and PostgreSQL you'll need to create a DB called sequelize_test. For MySQL this would look like this:
$ echo "CREATE DATABASE sequelize_test;" | mysql -urootCLEVER NOTE: your local MySQL install must be with username root without password. If you want to customize that just hack in the tests, but make sure to don't commit your credentials, we don't want to expose your personal data in sequelize codebase ;)
AND ONE LAST THING: Once npm install worked for you (see below), you'll get SQLite tests for free :)
Just "cd" into sequelize directory and run npm install, see an example below:
$ cd path/to/sequelize
$ npm installRight now, the test base is split into the test folder (which contains the lovely Mocha tests).
As you might haven't installed all of the supported SQL dialects, here is how to run the test suites for your development environment:
$ # run all tests at once:
$ make all
$ # run the buster specs for mysql:
$ make mysql
$ # run the buster specs for sqlite:
$ make sqlite
$ # run the buster specs for postgresql:
$ make pgsql
$ # alternatively you can pass database credentials with $variables when testing
$ DIALECT=dialect SEQ_DB=database SEQ_USER=user SEQ_PW=password make testJust commit and send pull requests. Happy hacking and thank you for contributing. Ah and one last thing: If you think you deserve it, feel free to add yourself to the package.json. Also I always look for projects which are using sequelize. If you have one of them, drop me a line!
As people are regularly complaining about missing semi-colons and strangely formatted things, I just want to explain the way I code JavaScript (including Sequelize ... obviously). I won't reject any pull-request because of having a different code style than me but it would be good to have a consistent way of coding in the whole project. Here are my rules of thumb:
Use spaces when defining functions.
function(arg1, arg2, arg3) {
return 1
}Use spaces for if statements.
if (condition) {
// do something
} else {
// something else
}var num = 1
, user = new User()
, date = new Date()for (var key in obj) {
if (obj.hasOwnProperty(key)) {
console.log(obj[key])
}
}{
"globals": {
"spyOn": false,
"it": false,
"console": false,
"describe": false,
"expect": false,
"beforeEach": false,
"waits": false,
"waitsFor": false,
"runs": false
},
"camelcase": true,
"curly": true,
"forin": true,
"indent": 2,
"unused": true,
"asi": true,
"evil": false,
"laxcomma": true,
"es5": true
}| Back | FazBrowse Home | New Git URL |