Skip to content

Commit 06c39bf

Browse files
committed
Stable Version 0.9.2.
1 parent 6011872 commit 06c39bf

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
##### 0.9.2 - 16 July 2015
2+
3+
###### Backwards compatible bug fixes
4+
- create and update weren't accepting options
5+
16
##### 0.9.1 - 10 July 2015
27

38
###### Backwards compatible bug fixes

dist/js-data-sql.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -398,28 +398,28 @@ module.exports =
398398
}
399399
}, {
400400
key: 'create',
401-
value: function create(resourceConfig, attrs) {
401+
value: function create(resourceConfig, attrs, options) {
402402
var _this3 = this;
403403

404404
attrs = DSUtils.removeCircular(DSUtils.omit(attrs, resourceConfig.relationFields || []));
405405
return this.query(resourceConfig.table || underscore(resourceConfig.name)).insert(attrs, resourceConfig.idAttribute).then(function (ids) {
406406
if (attrs[resourceConfig.idAttribute]) {
407-
return _this3.find(resourceConfig, attrs[resourceConfig.idAttribute]);
407+
return _this3.find(resourceConfig, attrs[resourceConfig.idAttribute], options);
408408
} else if (ids.length) {
409-
return _this3.find(resourceConfig, ids[0]);
409+
return _this3.find(resourceConfig, ids[0], options);
410410
} else {
411411
throw new Error('Failed to create!');
412412
}
413413
});
414414
}
415415
}, {
416416
key: 'update',
417-
value: function update(resourceConfig, id, attrs) {
417+
value: function update(resourceConfig, id, attrs, options) {
418418
var _this4 = this;
419419

420420
attrs = DSUtils.removeCircular(DSUtils.omit(attrs, resourceConfig.relationFields || []));
421421
return this.query(resourceConfig.table || underscore(resourceConfig.name)).where(resourceConfig.idAttribute, toString(id)).update(attrs).then(function () {
422-
return _this4.find(resourceConfig, id);
422+
return _this4.find(resourceConfig, id, options);
423423
});
424424
}
425425
}, {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data-sql",
33
"description": "Postgres/MySQL/MariaDB/SQLite3 adapter for js-data.",
4-
"version": "0.9.1",
4+
"version": "0.9.2",
55
"homepage": "http://www.js-data.io/docs/dssqladapter",
66
"repository": {
77
"type": "git",

src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -327,27 +327,27 @@ class DSSqlAdapter {
327327
}).then(() => items);
328328
}
329329

330-
create(resourceConfig, attrs) {
330+
create(resourceConfig, attrs, options) {
331331
attrs = DSUtils.removeCircular(DSUtils.omit(attrs, resourceConfig.relationFields || []));
332332
return this.query(resourceConfig.table || underscore(resourceConfig.name))
333333
.insert(attrs, resourceConfig.idAttribute)
334334
.then(ids => {
335335
if (attrs[resourceConfig.idAttribute]) {
336-
return this.find(resourceConfig, attrs[resourceConfig.idAttribute]);
336+
return this.find(resourceConfig, attrs[resourceConfig.idAttribute], options);
337337
} else if (ids.length) {
338-
return this.find(resourceConfig, ids[0]);
338+
return this.find(resourceConfig, ids[0], options);
339339
} else {
340340
throw new Error('Failed to create!');
341341
}
342342
});
343343
}
344344

345-
update(resourceConfig, id, attrs) {
345+
update(resourceConfig, id, attrs, options) {
346346
attrs = DSUtils.removeCircular(DSUtils.omit(attrs, resourceConfig.relationFields || []));
347347
return this.query(resourceConfig.table || underscore(resourceConfig.name))
348348
.where(resourceConfig.idAttribute, toString(id))
349349
.update(attrs)
350-
.then(() => this.find(resourceConfig, id));
350+
.then(() => this.find(resourceConfig, id, options));
351351
}
352352

353353
updateAll(resourceConfig, attrs, params, options) {

0 commit comments

Comments
 (0)