@wmfs/pg-model
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -0,1 +1,31 @@ | ||
## [1.1.2](https://github.com/wmfs/pg-model/compare/v1.1.1...v1.1.2) (2018-09-05) | ||
### 🐛 Bug Fixes | ||
* If there are no update columns, don't add the modifiedByField ([adb9438](https://github.com/wmfs/pg-model/commit/adb9438)) | ||
### 🛠 Builds | ||
* **deps-dev:** update [@semantic-release](https://github.com/semantic-release)/git requirement from 7.0.1 to 7.0.2 ([d8b86c6](https://github.com/wmfs/pg-model/commit/d8b86c6)) | ||
* **deps-dev:** update [@semantic-release](https://github.com/semantic-release)/git requirement from 7.0.2 to 7.0.3 ([6b9b9ad](https://github.com/wmfs/pg-model/commit/6b9b9ad)) | ||
* **deps-dev:** update codecov requirement from 3.0.4 to 3.1.0 ([19d8cd7](https://github.com/wmfs/pg-model/commit/19d8cd7)) | ||
* **deps-dev:** update nyc requirement from 12.0.2 to 13.0.1 ([146aea6](https://github.com/wmfs/pg-model/commit/146aea6)) | ||
* **deps-dev:** update semantic-release requirement from 15.9.11 to 15.9.12 ([8a360d9](https://github.com/wmfs/pg-model/commit/8a360d9)) | ||
* **deps-dev:** update semantic-release requirement from 15.9.3 to 15.9.5 ([214d139](https://github.com/wmfs/pg-model/commit/214d139)) | ||
* **deps-dev:** update semantic-release requirement from 15.9.5 to 15.9.6 ([4f5095a](https://github.com/wmfs/pg-model/commit/4f5095a)) | ||
* **deps-dev:** update semantic-release requirement from 15.9.6 to 15.9.7 ([0277dbb](https://github.com/wmfs/pg-model/commit/0277dbb)) | ||
* **deps-dev:** update semantic-release requirement from 15.9.7 to 15.9.8 ([60b020b](https://github.com/wmfs/pg-model/commit/60b020b)) | ||
* **deps-dev:** update semantic-release requirement from 15.9.8 to 15.9.9 ([374da3b](https://github.com/wmfs/pg-model/commit/374da3b)) | ||
* **deps-dev:** update semantic-release requirement from 15.9.9 to 15.9.11 ([7f3a701](https://github.com/wmfs/pg-model/commit/7f3a701)) | ||
* **deps-dev:** update semantic-release requirement to 15.9.2 ([aa0d19e](https://github.com/wmfs/pg-model/commit/aa0d19e)) | ||
* **deps-dev:** update semantic-release requirement to 15.9.3 ([b7776da](https://github.com/wmfs/pg-model/commit/b7776da)) | ||
* **dev-deps:** move to standard 12.0.1 ([314dca5](https://github.com/wmfs/pg-model/commit/314dca5)) | ||
### ♻️ Chores | ||
* codecov 3.0.3 -> 3.0.4 ([97e1f95](https://github.com/wmfs/pg-model/commit/97e1f95)) | ||
## [1.1.1](https://github.com/wmfs/pg-model/compare/v1.1.0...v1.1.1) (2018-07-30) | ||
@@ -2,0 +32,0 @@ |
@@ -34,3 +34,3 @@ 'use strict' | ||
addInsertStatementToScript (script, doc, options, preStatementHook) { | ||
const parsedDoc = this.model.parseDoc(doc, {includeNullFks: true}) | ||
const parsedDoc = this.model.parseDoc(doc, { includeNullFks: true }) | ||
@@ -97,3 +97,3 @@ const statement = | ||
if (this.model.modifiedByField && whereParts.length > 0) { | ||
if (this.model.modifiedByField && updateColumns.length > 0 && whereParts.length > 0) { | ||
updateColumns.push(this.model.modifiedByField) | ||
@@ -100,0 +100,0 @@ parsedDoc.keyAndAttributeValues.push(this.model.currentUserFn()) |
@@ -57,3 +57,3 @@ 'use strict' | ||
const targetPropertyId = subModel.targetProperties[i] | ||
where[sourcePropertyId] = {'equals': row[targetPropertyId]} | ||
where[sourcePropertyId] = { 'equals': row[targetPropertyId] } | ||
} | ||
@@ -60,0 +60,0 @@ ) |
@@ -311,3 +311,3 @@ 'use strict' | ||
i++ | ||
where[propertyId] = {'equals': id[i]} | ||
where[propertyId] = { 'equals': id[i] } | ||
} | ||
@@ -314,0 +314,0 @@ ) |
{ | ||
"name": "@wmfs/pg-model", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Takes a relational database structure and returns model objects for noSQL-like abilities.", | ||
@@ -32,11 +32,11 @@ "author": "West Midlands Fire Service", | ||
"chai-subset": "1.6.0", | ||
"codecov": "3.0.3", | ||
"codecov": "3.1.0", | ||
"conventional-changelog-metahub": "2.0.2", | ||
"cz-conventional-changelog": "2.1.0", | ||
"mocha": "5.2.0", | ||
"nyc": "12.0.2", | ||
"semantic-release": "15.9.1", | ||
"standard": "11.0.1", | ||
"nyc": "13.0.1", | ||
"semantic-release": "15.9.12", | ||
"standard": "12.0.1", | ||
"@semantic-release/changelog": "3.0.0", | ||
"@semantic-release/git": "7.0.1", | ||
"@semantic-release/git": "7.0.3", | ||
"@wmfs/hl-pg-client": "1.1.3", | ||
@@ -43,0 +43,0 @@ "@wmfs/pg-diff-sync": "1.0.0" |
@@ -305,4 +305,4 @@ /* eslint-env mocha */ | ||
where: { | ||
firstName: {equals: 'Bart'}, | ||
lastName: {equals: 'Simpson'} | ||
firstName: { equals: 'Bart' }, | ||
lastName: { equals: 'Simpson' } | ||
} | ||
@@ -329,3 +329,3 @@ } | ||
where: { | ||
name: {equals: 'Bart Simpson'} | ||
name: { equals: 'Bart Simpson' } | ||
} | ||
@@ -416,4 +416,4 @@ } | ||
where: { | ||
firstName: {equals: 'Homer'}, | ||
lastName: {equals: 'Simpson'} | ||
firstName: { equals: 'Homer' }, | ||
lastName: { equals: 'Simpson' } | ||
} | ||
@@ -437,3 +437,3 @@ } | ||
where: { | ||
name: {equals: 'Homer Simpson'} | ||
name: { equals: 'Homer Simpson' } | ||
} | ||
@@ -452,4 +452,4 @@ } | ||
where: { | ||
firstName: {equals: 'Ned'}, | ||
lastName: {equals: 'Flanders'} | ||
firstName: { equals: 'Ned' }, | ||
lastName: { equals: 'Flanders' } | ||
} | ||
@@ -466,3 +466,3 @@ } | ||
where: { | ||
name: {equals: 'Ned Flanders'} | ||
name: { equals: 'Ned Flanders' } | ||
} | ||
@@ -810,3 +810,3 @@ } | ||
where: { | ||
title: {'equals': 'Phobos'} | ||
title: { 'equals': 'Phobos' } | ||
} | ||
@@ -836,3 +836,3 @@ } | ||
where: { | ||
title: {'equals': 'Deimos'} | ||
title: { 'equals': 'Deimos' } | ||
} | ||
@@ -949,3 +949,3 @@ } | ||
where: { | ||
title: {'equals': 'Phobos'} | ||
title: { 'equals': 'Phobos' } | ||
} | ||
@@ -952,0 +952,0 @@ } |
@@ -91,3 +91,3 @@ /* eslint-env mocha */ | ||
{ | ||
idProperties: {employeeNo: '1'} | ||
idProperties: { employeeNo: '1' } | ||
} | ||
@@ -201,3 +201,3 @@ ) | ||
where: { | ||
age: {moreThan: 36} | ||
age: { moreThan: 36 } | ||
} | ||
@@ -217,3 +217,3 @@ }, | ||
where: { | ||
age: {moreThanEquals: 36} | ||
age: { moreThanEquals: 36 } | ||
} | ||
@@ -234,3 +234,3 @@ }, | ||
where: { | ||
age: {lessThan: 36} | ||
age: { lessThan: 36 } | ||
} | ||
@@ -251,3 +251,3 @@ }, | ||
where: { | ||
age: {lessThanEquals: 36} | ||
age: { lessThanEquals: 36 } | ||
} | ||
@@ -269,3 +269,3 @@ }, | ||
where: { | ||
firstName: {like: 'Mar'} | ||
firstName: { like: 'Mar' } | ||
} | ||
@@ -390,4 +390,4 @@ }, | ||
where: { | ||
firstName: {equals: 'Bart'}, | ||
lastName: {equals: 'Simpson'} | ||
firstName: { equals: 'Bart' }, | ||
lastName: { equals: 'Simpson' } | ||
} | ||
@@ -477,4 +477,4 @@ }, | ||
where: { | ||
firstName: {equals: 'Homer'}, | ||
lastName: {equals: 'Simpson'} | ||
firstName: { equals: 'Homer' }, | ||
lastName: { equals: 'Simpson' } | ||
} | ||
@@ -502,4 +502,4 @@ }, | ||
where: { | ||
firstName: {equals: 'Ned'}, | ||
lastName: {equals: 'Flanders'} | ||
firstName: { equals: 'Ned' }, | ||
lastName: { equals: 'Flanders' } | ||
} | ||
@@ -893,3 +893,3 @@ }, | ||
where: { | ||
title: {'equals': 'Phobos'} | ||
title: { 'equals': 'Phobos' } | ||
} | ||
@@ -922,3 +922,3 @@ }, | ||
where: { | ||
title: {'equals': 'Deimos'} | ||
title: { 'equals': 'Deimos' } | ||
} | ||
@@ -1061,3 +1061,3 @@ }, | ||
where: { | ||
title: {'equals': 'Phobos'} | ||
title: { 'equals': 'Phobos' } | ||
} | ||
@@ -1064,0 +1064,0 @@ } |
Sorry, the diff of this file is not supported yet
136995