Browse files

Merge branch 'master' of github.com:sdepold/sequelize

  • Loading branch information...
2 parents 6343ebb + c05f7ac commit 380a64e73eb0491b4212cd39635f5dfd82c50179 @sdepold committed Jan 15, 2013
Showing with 44 additions and 5 deletions.
  1. +1 −0 .gitignore
  2. +27 −0 README.md
  3. +3 −1 lib/migrator.js
  4. +1 −4 lib/utils.js
  5. +12 −0 spec-jasmine/utils.spec.js
View
1 .gitignore
@@ -4,3 +4,4 @@ test*.js
.DS_STORE
node_modules
npm-debug.log
+*~
View
27 README.md
@@ -19,6 +19,33 @@ The Sequelize library provides easy access to MySQL, SQLite or PostgreSQL databa
- Associations
- Importing definitions from single files
+## Roadmap
+
+A very basic roadmap. Chances aren't too bad, that not mentioned things are implemented as well. Don't panic :)
+
+### 1.6.0 (ToDo)
+- Fix last issues with eager loading of associated data
+- Find out why Person.belongsTo(House) would add person_id to house. It should add house_id to person
+
+### 1.7.0
+- 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
+- Eager loading of nested associations [#388](https://github.com/sdepold/sequelize/issues/388#issuecomment-12019099)
+
+### 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
+
## Documentation, Examples and Updates ##
You can find the documentation and announcements of updates on the [project's website](http://www.sequelizejs.com).
View
4 lib/migrator.js
@@ -93,7 +93,9 @@ module.exports = (function() {
callback && callback(null, result)
}
- var migrationFiles = fs.readdirSync(this.options.path)
+ var migrationFiles = fs.readdirSync(this.options.path).filter(function(file) {
+ return /\.js$/.test(file)
+ })
var migrations = migrationFiles.map(function(file) {
return new Migration(self, self.options.path + '/' + file)
View
5 lib/utils.js
@@ -47,10 +47,7 @@ var Utils = module.exports = {
return connection.escape(s).replace(/\\"/g, '"')
},
format: function(arr) {
- var query = arr[0]
- , replacements = Utils._.compact(arr.map(function(obj) { return obj != query ? obj : null}))
-
- return connection.format.apply(connection, [query, replacements])
+ return connection.format.apply(connection, [arr.shift(), arr])
},
isHash: function(obj) {
return Utils._.isObject(obj) && !Utils._.isArray(obj);
View
12 spec-jasmine/utils.spec.js
@@ -112,4 +112,16 @@ describe('Utils', function() {
expect(Utils.isHash(values)).toBeTruthy();
});
});
+
+ describe('format', function() {
+ it('should format where clause correctly when the value is truthy', function() {
+ var where = ['foo = ?', 1];
+ expect(Utils.format(where)).toEqual('foo = 1');
+ });
+
+ it('should format where clause correctly when the value is falsy', function() {
+ var where = ['foo = ?', 0];
+ expect(Utils.format(where)).toEqual('foo = 0');
+ });
+ });
})

0 comments on commit 380a64e

Please sign in to comment.