Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
452 commits
Select commit Hold shift + click to select a range
378fd96
store enums as text for sqlite + added test that checks if stored enu…
sdepold Mar 3, 2013
f2eb98a
Merge branch 'master' of github.com:sdepold/sequelize
sdepold Mar 3, 2013
a377f26
Merge branch 'raw-query-parameters' of git://github.com/kozze89/seque…
sdepold Mar 3, 2013
5992de7
added test for destruction of keys with dots when doing raw queries
sdepold Mar 3, 2013
f13e4e9
fixed logic of #467 and added tests
sdepold Mar 3, 2013
e417e0a
some documentation
sdepold Mar 3, 2013
6911009
Closes #470
janmeier Mar 4, 2013
3787944
lodash?
sdepold Mar 4, 2013
d259cec
docs
sdepold Mar 4, 2013
9fdc0b8
add the eagerly loaded data to the toJSON and values method
sdepold Mar 4, 2013
ef1ab8c
fix reference to Utils (which is broken due to the removal of global …
sdepold Mar 4, 2013
427a257
just a test for IRC
sdepold Mar 4, 2013
0af0f7f
Merge pull request #472 from sdepold/features/eager_loading_to_json
mickhansen Mar 4, 2013
27124e9
Mutiple calls to define with the same daoName would add duplicate ent…
Mar 4, 2013
197a0fb
Adds repository and issue tracking properties to package.json
Mar 5, 2013
784a941
group by + array
Mar 4, 2013
6bc272b
group by + array tests
Mar 5, 2013
35fe16f
Merge branch 'sislab' of git://github.com/sislab/sequelize into sisla…
sdepold Mar 5, 2013
d05004e
Adds support for Sequelize.DECIMAL, which takes optional arguments fo…
Mar 6, 2013
757da44
Removes MySQL dialect condition in the data types test
Mar 6, 2013
1889d80
Merge pull request #480 from alexyoung/master
mickhansen Mar 6, 2013
7357b7c
Update changelog.md
mickhansen Mar 6, 2013
7f3c7a9
encapsulate attributes
sdepold Mar 7, 2013
1eb42c4
.
janmeier Mar 11, 2013
a9a7ed7
.
janmeier Mar 11, 2013
e53fdf6
Merge branch 'master' of github.com:innofluence/sequelize
janmeier Mar 11, 2013
7361930
Initial impl.
janmeier Mar 11, 2013
144a7d0
spelling
janmeier Mar 11, 2013
8939902
spelling
janmeier Mar 11, 2013
22817a0
woops
janmeier Mar 11, 2013
05bcc45
added foreign key support to roadmap
sdepold Mar 12, 2013
99f5c14
Adds support for URL connection strings, with a test to ensure Sequel…
Mar 15, 2013
5788e91
Remove deprecation warning for node < 0.6 (closes #486)
janmeier Mar 16, 2013
e9113f3
fixes #494
solotimes Mar 21, 2013
fa0167d
Update changelog.md
sdepold Mar 23, 2013
ecd3de3
enum can now be defined with Sequelize.ENUM('asd1', 'asd2', 'asd3')
sdepold Mar 23, 2013
f2eca75
Merge branch 'fixIssue494' of git://github.com/solotimes/sequelize in…
sdepold Mar 24, 2013
dafcf1d
dates do not have precision of milliseconds anymore
sdepold Mar 24, 2013
b9d8b61
Merge branch 'dao-duplications' of git://github.com/whentomanage/sequ…
sdepold Mar 24, 2013
125143b
fixed tests
sdepold Mar 24, 2013
999baff
added equals change
sdepold Mar 24, 2013
6a21270
merged #473
sdepold Mar 24, 2013
efe2407
Merge branch 'refresh' of git://github.com/innofluence/sequelize into…
sdepold Mar 26, 2013
27b8848
use Model.find to reload a model instance
sdepold Mar 27, 2013
7139a63
extracted log in order to be able to use it somewhere else
sdepold Mar 27, 2013
a8efaea
made addQuotes and removeQuotes parts of the QueryGenerator
sdepold Mar 27, 2013
f178b9e
removed old code
sdepold Mar 27, 2013
0ce9267
added tests for reloading associations
sdepold Mar 27, 2013
68b9b83
Adds back arguments to Sequelize constructor for clarity (suggested b…
Apr 1, 2013
85ad02e
v1.6.0
sdepold Apr 2, 2013
477289e
added link to 1.6.0
sdepold Apr 2, 2013
3d8bce5
Remove setTimeout in favor of process.nextTick()
mweibel Apr 3, 2013
dca436e
Move process.nextTick() to run() method
mweibel Apr 3, 2013
48fe986
Make travis happy & make my need for semicolons happy ;)
mweibel Apr 3, 2013
4caf109
Add string escape for postgresql in custom query
Apr 5, 2013
773b2b6
Ajust Test config with default value
Apr 5, 2013
ef81d00
Merge pull request #509 from mweibel/master
janmeier Apr 8, 2013
fe77d52
Rm those pesky semi-colons - shame on you @mweibel
janmeier Apr 8, 2013
f54644e
Why use self when we have bind?
mickhansen Apr 8, 2013
3929001
option to change filesFiltes on Migrator
masonblier Apr 9, 2013
01d9a4b
Merge pull request #490 from alexyoung/master
mickhansen Apr 9, 2013
8244acc
Remove else section from pull #490
mickhansen Apr 9, 2013
a0f9e8d
Merge pull request #525 from masonblier/master
mickhansen Apr 9, 2013
b2e92af
Add a missing docs section to roadmap
janmeier Apr 9, 2013
4a340ef
Update jasmine node dependency to 1.5.0 and update path to test scripts
janmeier Apr 9, 2013
b92165e
Update build-status to link to sequelize org, not sdepold
janmeier Apr 9, 2013
bccce1d
CustomEventEmitter.proxy method, proxies events from one emitter to a…
mickhansen Apr 9, 2013
2e093af
adding tests for good measure
mickhansen Apr 9, 2013
55e2143
add .jshintrc file
mickhansen Apr 9, 2013
f5ac508
Remove missing docs part from roadmap. Features missing documentation…
janmeier Apr 9, 2013
b095535
Handle sql event aswell
mickhansen Apr 9, 2013
0a41a8f
each -> foreaceh
mickhansen Apr 9, 2013
a3313d6
Merge pull request #528 from innofluence/proxy
sdepold Apr 9, 2013
3354c93
formatting
sdepold Apr 9, 2013
edef629
WIP
iamjochem Apr 10, 2013
63f8a1b
allow running of [jasmine] tests against MySQL instance that is eithe…
iamjochem Apr 10, 2013
770c10c
implement object "attribute" (aka fields) property getters/setters on…
iamjochem Apr 10, 2013
2d298a3
add tests for getters/setters, bugfix, refactor - its WIP
iamjochem Apr 11, 2013
d04fa71
fixes #529
janmeier Apr 11, 2013
53d4f5d
die travis, DIE
janmeier Apr 11, 2013
fdc7840
Merge pull request #540 from innofluence/529fix
janmeier Apr 11, 2013
5cc1262
Merge pull request #534 from iamjochem/feature/jasmineMySQLTestsWorkW…
janmeier Apr 11, 2013
3580e56
added flattr button
sdepold Apr 16, 2013
0d08651
- useful error message for bad data type (fixes #551)
Apr 17, 2013
bfed61f
Fix 0 primary key
janmeier Apr 17, 2013
d3aebaa
Works for PG as well
janmeier Apr 17, 2013
26e5fe4
Fix tests to also work for PG
janmeier Apr 17, 2013
e0a41d2
Change to hasOwnProperty
janmeier Apr 18, 2013
db76b11
- correcting error message
Apr 18, 2013
94ce958
- changed error message to match expected test result
Apr 18, 2013
de46a5b
bump ...
janmeier Apr 19, 2013
0aba244
Merge pull request #554 from innofluence/543fix
mickhansen Apr 19, 2013
0c70eb4
Added the ability for schemas to be declared (useful for PostgreSQL).…
durango Apr 20, 2013
1e6d842
Added basic HSTORE support for PostgreSQL
durango Apr 22, 2013
9866c5d
remove property check in DAO.prototype.setDataValue - it is not corre…
iamjochem Apr 23, 2013
38a1458
Added changes as requested for the new schematic support.
durango Apr 23, 2013
2cf9d4f
Fixed typo in lib/dao-factory for schemaDelimiter
durango Apr 24, 2013
2f5415f
schematics
sdepold Apr 24, 2013
513aeb1
- adding second test for object style definition
Apr 25, 2013
9995014
Inital upgrade to v.1.6.0
Apr 25, 2013
0ed44c2
code fix
Apr 25, 2013
75d7eef
Update the generated migration skeleton for async
Apr 26, 2013
0328b0a
Merge pull request #567 from terraflubb/migration_skeleton_gen_async_…
sdepold Apr 26, 2013
9011d75
Merge pull request #553 from crossman/master
janmeier Apr 28, 2013
f1ecabb
Change from _.each to native forEach
janmeier Apr 28, 2013
8ccd34b
Revert back to _.each, idiot
janmeier Apr 28, 2013
3791a29
When value is null, don't try to convert to Date, instead just leave it
mweibel Apr 29, 2013
9e82d76
Add test for checking the new behaviour
mweibel Apr 29, 2013
fe199e9
Change important MySQL query generator functions from using _.templat…
alum Apr 29, 2013
1009cb9
#572
sdepold Apr 29, 2013
b2184b2
v1.7.0-alpha1
sdepold Apr 29, 2013
9cfcc80
Updated config directory to correct location in examples.
tjmehta Apr 29, 2013
397e4d8
Updated readme with runnable examples
tjmehta Apr 29, 2013
4827513
Change important MySQL query generator functions from using _.templat…
alum Apr 29, 2013
d69ee78
Merge branch 'mysql-performance-improvements' of https://github.com/a…
alum Apr 29, 2013
9192014
bug fixing for undefined column in the table.
Apr 30, 2013
25ffe40
bug fixing on undefine column on table when create()
May 1, 2013
efa85a9
Remove unnecessary semi-colon from query
alum May 2, 2013
a1c06dd
Merge pull request #573 from alum/mysql-performance-improvements
mickhansen May 2, 2013
92bb5fe
Added decimal support for min/max, closes #579
durango May 2, 2013
1c56292
Merge pull request #583 from durango/master
durango May 2, 2013
34ed0d7
'ORDER BY' should come after 'GROUP BY'
mekanics May 2, 2013
1f1364d
Merge branch 'postgres-clause-order-fix' of git://github.com/mekanics…
durango May 2, 2013
c78b739
Updated changelog
durango May 2, 2013
ffb5012
updating generic-pool version (to include validate functionality)
jfred May 3, 2013
692cb48
Adding connection validation and handling of PROTOCOL_CONNECTION_LOST…
jfred May 3, 2013
750817c
Merge branch 'master' of git://github.com/wyplay/sequelize into wypla…
durango May 3, 2013
b348b17
node domains supported
darvin May 3, 2013
644f6ef
Support for foreign keys in creating tables
optilude Apr 30, 2013
8f86153
Tests + fixes for attributesToSQL
optilude Apr 30, 2013
559e1ce
Basic implementation of capturing foreign key status
optilude Apr 30, 2013
10ec7ff
Tidy up setting of new attributes
optilude May 4, 2013
556a663
Topologically sorted iterator for DAOs taking dependencies into account
optilude May 4, 2013
f293a11
Create tables in dependency order
optilude May 4, 2013
be4ffc9
Support for dropping tables with constraints
optilude May 4, 2013
417a832
Skeletal test
optilude May 4, 2013
03ca029
Fixes after rebase
optilude May 5, 2013
1df9027
Don't pretend like composite primary keys work: they need to be handl…
optilude May 5, 2013
151a23f
Factor FK constraint logic out into a helper function
optilude May 5, 2013
6643167
Make cascade optional
optilude May 6, 2013
47f7e4c
Turn on foreign key checking for SQLite
optilude May 6, 2013
c3caadc
the 'include' parameter of the find method should not overwrite the '…
mekanics May 2, 2013
db1a504
Improve pragma handling for sqlite3
optilude May 6, 2013
9180844
Improve test coverage for cascade deletion in postgres
optilude May 6, 2013
7491c22
Tests for delete cascade
optilude May 6, 2013
27e9f9a
Replaced underscore with lodash.
durango May 6, 2013
35aeb2c
Test for update cascade and restrict
optilude May 6, 2013
bc2a708
readd changes from sar sequelize
scottrutherford May 7, 2013
809453f
Minor updates following comments form @janmeier
optilude May 7, 2013
5e12d1b
Merge pull request #594 from durango/lodash
sdepold May 8, 2013
3b03f5d
Update README.md
sdepold May 8, 2013
d25e697
lodash
sdepold May 8, 2013
256db5c
Merge pull request #595 from optilude/fk-constraints
sdepold May 8, 2013
d0cfa94
fk constraints
sdepold May 8, 2013
cfa224b
Updated roadmap with foreign key support
janmeier May 8, 2013
08c69a8
Added deletedAt buster tests borrowed from @gustawpursche
janmeier May 8, 2013
067e97c
Merge pull request #597 from innofluence/deletedAtTest
janmeier May 8, 2013
7e9d13d
Merge branch 'master' of github.com:sequelize/sequelize
sdepold May 9, 2013
7affa31
fixed url to irc channel
sdepold May 9, 2013
3c05453
Validations will now be called upon .save() and allowNull: true skips…
durango May 9, 2013
421fc4f
DAO factory API sketch
optilude Apr 21, 2013
2029345
Query interface and generator API sketch
optilude Apr 21, 2013
cfb657a
Implementation sketch and query generators
optilude Apr 23, 2013
290e895
Refactored and simplified create method plus outline tests
optilude Apr 24, 2013
eff68d6
Refactor given understanding of how it's possible to return autogener…
optilude Apr 27, 2013
ea0926f
Enum test
optilude Apr 27, 2013
daf936f
Test for bulk update
optilude Apr 27, 2013
a8a1254
Tests for bulkUpdate
optilude Apr 27, 2013
ade36f1
Test + fix for bulk delete
optilude Apr 27, 2013
65db2ad
Changelog entry
optilude Apr 27, 2013
31ec3a1
Fix typo in interface method name
optilude Apr 27, 2013
3b951e1
Rename and rationalise methods as per discussion on GitHub
optilude Apr 28, 2013
d2e9adc
Rebase onto sequelize master and reflect MySQL query generator refact…
optilude May 6, 2013
f5d9359
Update tests thanks to @janmeier's review
optilude May 7, 2013
fedb9cd
Merge pull request #569 from optilude/master
janmeier May 9, 2013
00f5f77
Change roadmap for bulk update, insert, delete
janmeier May 9, 2013
ecd1672
Added final changes as requested by sdepold
durango May 9, 2013
054a603
Added link to bulk insert, update, delete
janmeier May 9, 2013
d7a96a1
Merge pull request #601 from durango/validate-save-null
durango May 9, 2013
eea3828
Some PR broke this concept, so I'm not safely type checking all the w…
durango May 9, 2013
f692de9
Merge pull request #602 from durango/hstore-raw
durango May 9, 2013
d066f93
Upgraded validation for IPv6 support. Closes #371
durango May 9, 2013
0b5f0f1
Merge pull request #603 from durango/upgraded-validation
durango May 9, 2013
b168e55
error messages ftw
sdepold May 10, 2013
5e8eac2
Add failing case for MySQL query gen with bool. (Issue #607)
terraflubb May 10, 2013
42a44f1
MySQL: Outgoing booleans are turned into ints
terraflubb May 10, 2013
72d2737
Minor low-hanging changes to improve jshint performance
terraflubb May 10, 2013
026efd4
Failing tests for MySQL where clause value processing
terraflubb May 10, 2013
3f20fb5
Process values going into WHERE clauses in MySQL
terraflubb May 10, 2013
46f5caf
Migration environment set from command line args
terraflubb May 11, 2013
37244f1
(Subjectively) improve copy in binary
terraflubb May 11, 2013
6f65e6d
Include a done() in the migration skeleton
terraflubb May 11, 2013
4c23c8a
Throw nicer errors when we can't read config.json
terraflubb May 11, 2013
61482c0
Make migrations more verbose and time migrations
terraflubb May 11, 2013
eda888a
DataTypes improved
willrnch May 11, 2013
3935784
package.json now links to the right repo
janmeier May 11, 2013
ae1d4f6
Allow find and findall to take query options
janmeier May 11, 2013
3d1043c
update changelog
janmeier May 11, 2013
023e751
Yay TRAVIS
janmeier May 11, 2013
e772a0c
Merge pull request #613 from innofluence/findQueryOptions
durango May 11, 2013
b3b9cc1
Merge branch 'master' of github.com:sequelize/sequelize
sdepold May 13, 2013
c23f27a
Merge branch 'master' of git://github.com/Costent/sequelize into Cost…
sdepold May 13, 2013
01b66ce
added tests for new data types
sdepold May 13, 2013
705b752
Merge branch 'Costent-master'
sdepold May 13, 2013
6d5b8a1
convenient data types
sdepold May 13, 2013
48eba5f
Merge branch 'master' of github.com:sequelize/sequelize
sdepold May 13, 2013
c15eacd
Merge branch 'make_binary_verbose' of git://github.com/terraflubb/seq…
sdepold May 13, 2013
b4361e6
fixed logging
sdepold May 13, 2013
2514c2d
more verbose binary
sdepold May 13, 2013
2fece68
Merge branch 'terraflubb-make_binary_verbose'
sdepold May 13, 2013
1f2ef88
a test that makes sure that null values are correctly restored
sdepold May 13, 2013
d3669c8
Merge pull request #608 from terraflubb/mysql_bools_save_as_tinyints
sdepold May 13, 2013
2cf8d70
boolean handling
sdepold May 13, 2013
4b69b34
MySQL: Empty `where` param makes bogus query.
terraflubb May 14, 2013
3492042
Merge branch 'nowhere_is_empty' of git://github.com/terraflubb/sequel…
sdepold May 14, 2013
ea3c187
Merge branch 'master' of github.com:sequelize/sequelize
sdepold May 14, 2013
fa6112f
fixed specs
sdepold May 14, 2013
30ad8c1
Merge branch 'terraflubb-nowhere_is_empty'
sdepold May 14, 2013
5cd5c64
fixed empty where conditions for mysql
sdepold May 14, 2013
8cc128a
Added options to fix #490. Now you can use a connection string (i.e. …
May 14, 2013
3274d2d
Merge pull request #622 from jechenique/master
janmeier May 14, 2013
1f1f31f
commit for travis ;)
mekanics May 15, 2013
c9f6924
Merge pull request #584 from mekanics/find-para-include-fix
janmeier May 15, 2013
e8a518e
merge sequelize@1.7.0-alpha1 - trying to keep the PR up2date
iamjochem May 16, 2013
52fbf2e
Merge package.json
janmeier May 16, 2013
8fda52b
make it possible to define property getter and setter functions in a …
iamjochem May 16, 2013
b335eaa
bogus commit (no code changes) to force travis-ci to run again (lets …
iamjochem May 16, 2013
6c52080
Add promise then to custom emitter
kevinbeaty May 17, 2013
9ff786f
"getWhereConditions" in the postgres "QueryGenerator"
May 18, 2013
e03956a
Fixed two syntax errors in postgres QueryGenerator (removed 2 unneede…
May 18, 2013
7683f13
Updated postgres query-generator jasmine spec to
May 18, 2013
29e5b1f
Merge pull request #630 from Obbedire/master
janmeier May 19, 2013
4bca617
Run tests for 0.10 as well
janmeier May 19, 2013
b67f407
PG does not like v0.10. Update buster dep. to 0.6.3
janmeier May 19, 2013
02e8ddd
add test for skipping validations when value is null and allowNull is…
tremby May 19, 2013
adce84f
Merge pull request #634 from tremby/allowNull-skip-validations-test
janmeier May 20, 2013
1f313c1
Merge pull request #626 from kevinbeaty/emitpromise
sdepold May 20, 2013
b14ecc5
promises/a support
sdepold May 20, 2013
16e13f6
Enable the override of the default attributes
May 21, 2013
a524aea
Ugly fix: SQLite addQuotes is wrongly done, hence copy the code from …
mweibel May 21, 2013
1597705
Merge pull request #574 from Runnable/master
sdepold May 22, 2013
a7436d3
Merge pull request #635 from sevastos/override-default-attributes
sdepold May 22, 2013
b9e335d
overriding default columns
sdepold May 22, 2013
2eb25d6
Merge pull request #636 from mweibel/fix-sqlite-addquotes
janmeier May 22, 2013
41c1b6a
evil space
sdepold May 22, 2013
ec4f8ef
Merge pull request #538 from iamjochem/feature/doaGettersAndSetters
durango May 23, 2013
42b68bf
Updating changelog and readme for getters/setters.
durango May 23, 2013
cc587b6
merged from the latest
May 23, 2013
abfd3fe
code fix to support existing features
May 24, 2013
f3441ce
bug fixing
May 24, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ test*.js
.DS_STORE
node_modules
npm-debug.log
*~
22 changes: 22 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"globals": {
"jasmine": false,
"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
}
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,4 @@ env:
language: node_js

node_js:
# - 0.6
- 0.8
# - 0.9

- 0.8
17 changes: 17 additions & 0 deletions .watchr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var watchr = require('watchr')
, spawn = require('child_process').spawn

watchr.watch({
paths: [__dirname + '/lib', __dirname + '/spec', __dirname + '/index.js'],
listener: function(eventName) {
if (['new', 'change'].indexOf(eventName) > -1) {
// generate the documentation
spawn('npm', ['run', 'docs'])

// run the tests
var buster = spawn('./node_modules/.bin/buster-test', ['--reporter', 'specification'], { env: process.ENV })
buster.stderr.on('data', function(data) { console.log(data.toString()) })
buster.stdout.on('data', function(data) { console.log(data.toString()) })
}
}
})
130 changes: 124 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

The Sequelize library provides easy access to MySQL, SQLite or PostgreSQL databases by mapping database entries to objects and vice versa. To put it in a nutshell... it's an ORM (Object-Relational-Mapper). The library is written entirely in JavaScript and can be used in the Node.JS environment.

<a href="http://flattr.com/thing/1259407/Sequelize" target="_blank">
<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>

## Important Notes ##

### 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](http://blog.sequelizejs.com/post/46949108134/v1-6-0-eager-loading-support-for-enums-decimals-and) Eager loading, support for enums, decimals and bigint, performance improvements …
- [v1.4.1](http://blog.sequelizejs.com/post/24403298792/changes-in-sequelize-1-4-1): deprecation of node < 0.6, logging customization, ...
- [v1.4.0](http://blog.sequelizejs.com/post/24345409723/changes-in-sequelize-1-4-0): postgresql, connection pooling, ...
- [v1.3.0](http://blog.depold.com/post/15283366633/changes-in-sequelize-1-3-0): migrations, cross-database, validations, new listener notation, ...
Expand All @@ -19,16 +30,55 @@ The Sequelize library provides easy access to MySQL, SQLite or PostgreSQL databa
- Associations
- Importing definitions from single files

## Documentation, Examples and Updates ##
## Documentation and Updates ##

You can find the documentation and announcements of updates on the [project's website](http://www.sequelizejs.com).
If you want to know about latest development and releases, follow me on [Twitter](http://twitter.com/sdepold).
Also make sure to take a look at the examples in the repository. The website will contain them soon, as well.

- [Documentation](http://www.sequelizejs.com)
- [Twitter](http://twitter.com/sdepold)
- [IRC](irc://irc.freenode.net/sequelizejs)
- [XING](https://www.xing.com/net/priec1b5cx/sequelize)
- [IRC](http://webchat.freenode.net?channels=sequelizejs)
- [Google Groups](https://groups.google.com/forum/#!forum/sequelize)
- [XING](https://www.xing.com/net/priec1b5cx/sequelize) (pretty much inactive, but you might want to name it on your profile)

## Running Examples
Instructions for running samples are located in the [example directory](https://github.com/sequelize/sequelize/tree/master/examples). Try these samples in a live sandbox environment:

<a href="https://runnable.com/sequelize" target="_blank"><img src="https://runnable.com/external/styles/assets/runnablebtn.png"></a>

## Roadmap

A very basic roadmap. Chances aren't too bad, that not mentioned things are implemented as well. Don't panic :)

### 1.7.0
- ~~Check if lodash is a proper alternative to current underscore usage.~~
- Transactions
- Support for update of tables without primary key
- MariaDB support
- ~~Support for update and delete calls for whole tables without previous loading of instances~~ Implemented in [#569](https://github.com/sequelize/sequelize/pull/569) thanks to @optiltude
- Eager loading of nested associations [#388](https://github.com/sdepold/sequelize/issues/388#issuecomment-12019099)
- Model#delete
- ~~Validate a model before it gets saved.~~ Implemented in [#601](https://github.com/sequelize/sequelize/pull/601), thanks to @durango
- Move validation of enum attribute value to validate method
- BLOB [#99](https://github.com/sequelize/sequelize/issues/99)
- ~~Support for foreign keys~~ Implemented in [#595](https://github.com/sequelize/sequelize/pull/595), thanks to @optilude

### 1.7.x
- Complete support for non-id primary keys

### 1.8.0
- API sugar (like Model.select().where().group().include().all())
- Schema dumping
- ~~enum support~~
- attributes / values of a dao instance should be scoped

### 2.0.0
- ~~save datetimes in UTC~~
- encapsulate attributes if a dao inside the attributes property
- ~~add getters and setters for dao~~ Implemented in [#538](https://github.com/sequelize/sequelize/pull/538), thanks to iamjochem
- add proper error message everywhere


## Collaboration 2.0 ##

Expand All @@ -39,8 +89,8 @@ Still interested? Coolio! Here is how to get started:
### 1. Prepare your environment ###

Here comes a little surprise: You need [Node.JS](http://nodejs.org). In order to be
a productive developer, I would recommend the latest v0.8 (or a stable 0.9 if
already out). Also I usually recommend [NVM](https://github.com/creationix/nvm).
a productive developer, I would recommend the latest v0.8. Also I usually recommend
[NVM](https://github.com/creationix/nvm).

Once Node.JS is installed on your computer, you will also have access to the lovely
Node Package Manager (NPM).
Expand Down Expand Up @@ -118,10 +168,78 @@ Ah and one last thing: If you think you deserve it, feel free to add yourself to
`package.json`. Also I always look for projects which are using sequelize. If you have
one of them, drop me a line!

### 6. Some words about coding style ###

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:

- No semi-colons. Where possible I try to avoid semi-colons. Please don't discuss this topic with me. Thanks.
- Curly braces for single line if blocks. I always add curly braces to if blocks. Same for loops and other places.
- Spacing. Indentation = 2 spaces. Also I add a lot of spaces where possible. See below.
- Anonymous functions over names functions. Usually I declare a function and assign it to a variable: `var foo = function() {}`
- Variable declarations. If multiple variables are defined, I use a leading comma for separation.
- Camelcased variable names. No underscores.
- Make sure that key is in objects when iterating over it. See below.

#### 6.1. Spaces ####

Use spaces when defining functions.

```js
function(arg1, arg2, arg3) {
return 1
}
```

Use spaces for if statements.

```js
if (condition) {
// do something
} else {
// something else
}
```

#### 6.2. Variable declarations ####

```js
var num = 1
, user = new User()
, date = new Date()
```

#### 6.3. For-In-loops ####

```js
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
console.log(obj[key])
}
}
```

#### 6.4. JSHint options ####

```js
{
"camelcase": true,
"curly": true,
"forin": true,
"indent": 2,
"unused": true,
"asi": true,
"evil": false,
"laxcomma": true
}
```

# Build status

The automated tests we talk about just so much are running on
[Travis public CI](http://travis-ci.org), here is its status:

[![Build Status](https://secure.travis-ci.org/sdepold/sequelize.png)](http://travis-ci.org/sdepold/sequelize)
[![Build Status](https://secure.travis-ci.org/sequelize/sequelize.png)](http://travis-ci.org/sequelize/sequelize)
2 changes: 1 addition & 1 deletion bin/sequelize
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ program
.version(packageJson.version)
.option('-i, --init', 'Initializes the project. Creates a config/config.json')
.option('-m, --migrate', 'Runs undone migrations')
.option('-u, --undo', 'Redo the last migration.')
.option('-u, --undo', 'Undo the last migration.')
.option('-f, --force', 'Forces the action to be done.')
.option('-c, --create-migration [migration-name]', 'Create a new migration skeleton file.')
.parse(process.argv)
Expand Down
46 changes: 45 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,42 @@
# v1.7.0 #
- [DEPENDENCIES] Upgraded validator for IPv6 support. [#603](https://github.com/sequelize/sequelize/pull/603). thanks to durango
- [DEPENDENCIES] replaced underscore by lodash. [#954](https://github.com/sequelize/sequelize/pull/594). thanks to durango
- [BUG] Fix string escape with postgresql on raw SQL queries. [#586](https://github.com/sequelize/sequelize/pull/586). thanks to zanamixx
- [BUG] "order by" is now after "group by". [#585](https://github.com/sequelize/sequelize/pull/585). thanks to mekanics
- [BUG] Added decimal support for min/max. [#583](https://github.com/sequelize/sequelize/pull/583). thanks to durango
- [BUG] Null dates don't break SQLite anymore. [#572](https://github.com/sequelize/sequelize/pull/572). thanks to mweibel
- [BUG] Correctly handle booleans in MySQL. [#608](https://github.com/sequelize/sequelize/pull/608). Thanks to terraflubb
- [BUG] Fixed empty where conditions in MySQL. [#619](https://github.com/sequelize/sequelize/pull/619). Thanks to terraflubb
- [BUG] Allow overriding of default columns. [#635](https://github.com/sequelize/sequelize/pull/635). Thanks to sevastos
- [FEATURE] Validate a model before it gets saved. [#601](https://github.com/sequelize/sequelize/pull/601). thanks to durango
- [FEATURE] Schematics. [#564](https://github.com/sequelize/sequelize/pull/564). thanks to durango
- [FEATURE] Foreign key constraints. [#595](https://github.com/sequelize/sequelize/pull/595). thanks to optilude
- [FEATURE] Support for bulk insert (`<DAOFactory>.bulkCreate()`, update (`<DAOFactory>.update()`) and delete (`<DAOFactory>.destroy()`) [#569](https://github.com/sequelize/sequelize/pull/569). thanks to optilude
- [FEATURE] Add an extra `queryOptions` parameter to `DAOFactory.find` and `DAOFactory.findAll`. This allows a user to specify `{ raw: true }`, meaning that the raw result should be returned, instead of built DAOs. Usefull for queries returning large datasets, see [#611](https://github.com/sequelize/sequelize/pull/611) janmeier
- [FEATURE] Added convenient data types. [#616](https://github.com/sequelize/sequelize/pull/616). Thanks to Costent
- [FEATURE] Binary is more verbose now. [#612](https://github.com/sequelize/sequelize/pull/612). Thanks to terraflubb
- [FEATURE] Promises/A support. [#626](https://github.com/sequelize/sequelize/pull/626). Thanks to kevinbeaty
- [FEATURE] Added Getters/Setters method for DAO. [#538](https://github.com/sequelize/sequelize/pull/538). Thanks to iamjochem

# v1.6.0 #
- [DEPENDENCIES] upgrade mysql to alpha7. You *MUST* use this version or newer for DATETIMEs to work
- [DEPENDENCIES] upgraded most dependencies. most important: mysql was upgraded to 2.0.0-alpha-3
- [DEPENDENCIES] mysql is now an optional dependency. #355 (thanks to clkao)
- [REFACTORING] separated tests for dialects
- [REFACTORING] reduced number of sql queries used for adding an element to a N:M association. #449 (thanks to innofluence/janmeier)
- [REFACTORING] dropped support for synchronous migrations. added third parameter which needs to get called once the migration has been finished. also this adds support for asynchronous actions in migrations.
- [OTHERS] code was formatted to fit the latest code style guidelines (thanks to durango)
- [OTHERS] Explicitly target ./docs folder for generate-docs script. #444 (thanks to carsondarling)
- [OTHERS] Overwrite existing daoFactoryDefinition if there already has been one. (thanks to robraux)
- [BUG] fixed wrong version in sequelize binary
- [BUG] local options have higher priority than global options (thanks to guersam)
- [BUG] fixed where clause when passing an empty array (thanks to kbackowski)
- [FEATURE] added association prefetching for find and findAll
- [BUG] fixed updateAttributes for models/tables without primary key (thanks to durango)
- [BUG] fixed the location of the foreign key when using belongsTo (thanks to ricardograca)
- [BUG] don't return timestamps if only specific attributes have been seleceted (thanks to ricardograca)
- [BUG] fixed removeColumn for sqlite
- [BUG] fixed date equality check for instances. (thanks to solotimes)
- [FEATURE] added association prefetching /eager loading for find and findAll. #465
- [FEATURE] it's now possible to use callbacks of async functions inside migrations (thanks to mphilpot)
- [FEATURE] improved comfort of sequelize.query. just pass an sql string to it and wait for the result
- [FEATURE] Migrations now understand NODE_ENV (thanks to gavri)
Expand All @@ -17,6 +49,18 @@
- [FEATURE] added possibility to define the attributes of received associations (thanks to joshm)
- [FEATURE] added findOrCreate, which returns a the already existing instance or creates one (thanks to eveiga)
- [FEATURE] minConnections option for MySQL pooling (thanks to dominiklessel)
- [FEATURE] added BIGINT data type which is treated like a string (thanks to adamsch1)
- [FEATURE] experimental support for read replication for mysql (thanks to Janzeh)
- [FEATURE] allow definition of a models table name (thanks to slamkajs)
- [FEATURE] allow usage of enums. #440 (thanks to KevinMartin)
- [FEATURE] allows updateAttributes to target specific fields only (thanks to Pasvaz)
- [FEATURE] timestamps are now stored as UTC. #461 (thanks to innofluence/janmeier)
- [FEATURE] results of raw queries are parsed with dottie. #468 (thanks to kozze89)
- [FEATURE] support for array serialization. pg only. #443 (thanks to clkao)
- [FEATURE] add increment and decrement methods on dao. #408 (thanks to janmeier/innofluence)
- [FEATURE] unified the result of describeTable
- [FEATURE] add support for decimals (thanks to alexyoung)
- [FEATURE] added DAO.reload(), which updates the attributes of the DAO in-place (as opposed to doing having to do a find() and returning a new model)

# v1.5.0 #
- [REFACTORING] use underscore functions for Utils.isHash (thanks to Mick-Hansen/innofluence)
Expand Down
18 changes: 18 additions & 0 deletions docs/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
YUI.add("yuidoc-meta", function(Y) {
Y.YUIDoc = { meta: {
"classes": [
"QueryInterface",
"Sequelize"
],
"modules": [
"Sequelize"
],
"allModules": [
{
"displayName": "Sequelize",
"name": "Sequelize",
"description": "The entry point."
}
]
} };
});
Binary file added docs/assets/css/external-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/css/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading