goodybag/mongo-sql — pull request #76 by jrf0110 (2013-11-26 20:56:35+00:00)
Title: Dates not handled correctly in update where clause

Consider this:

```js
var sql = require('mongo-sql').sql

var query = sql({
type: 'update',
table: 'blah',
values: {name: 'brian'},
where: {
id: 1,
birthday: new Date()
}
})

console.log(query.toQuery())
```

The actual output from this is:

```sh
{ text: 'update "blah" set "name" = $1 where "blah"."id" = $2',
values: [ 'brian', 1 ] }
```

Unfortunately in my scenario I have a table with a primary key of (id, date) and so using mongo-sql updated all records for the ID instead of just the one for the given (id, date) pair. :frowning:

Am I missing something here or are dates just not supported at the moment?