sedentary-pg 0.0.46 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/pgdb.js +1 -1
- package/dist/es/pgdb.js +2 -2
- package/package.json +2 -2
package/dist/cjs/pgdb.js
CHANGED
|
@@ -194,7 +194,7 @@ class PGDB extends sedentary_1.DB {
|
|
|
194
194
|
const actions = [];
|
|
195
195
|
for (const attribute in attributes) {
|
|
196
196
|
const value = this[attribute];
|
|
197
|
-
if (value
|
|
197
|
+
if ((0, sedentary_1.differ)(value, loaded[attribute]))
|
|
198
198
|
actions.push(`${attributes[attribute]} = ${self.escape(value)}`);
|
|
199
199
|
}
|
|
200
200
|
if (actions.length)
|
package/dist/es/pgdb.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DatabaseError, Pool, types as PGtypes } from "pg";
|
|
2
2
|
import format from "pg-format";
|
|
3
|
-
import { DB, Transaction } from "sedentary";
|
|
3
|
+
import { DB, differ, Transaction } from "sedentary";
|
|
4
4
|
import { adsrc } from "./adsrc";
|
|
5
5
|
const needDrop = [
|
|
6
6
|
["DATETIME", "int2"],
|
|
@@ -189,7 +189,7 @@ export class PGDB extends DB {
|
|
|
189
189
|
const actions = [];
|
|
190
190
|
for (const attribute in attributes) {
|
|
191
191
|
const value = this[attribute];
|
|
192
|
-
if (value
|
|
192
|
+
if (differ(value, loaded[attribute]))
|
|
193
193
|
actions.push(`${attributes[attribute]} = ${self.escape(value)}`);
|
|
194
194
|
}
|
|
195
195
|
if (actions.length)
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@types/pg": "8.6.5",
|
|
10
10
|
"pg": "8.8.0",
|
|
11
11
|
"pg-format": "1.0.4",
|
|
12
|
-
"sedentary": "0.0.
|
|
12
|
+
"sedentary": "0.0.47"
|
|
13
13
|
},
|
|
14
14
|
"description": "The ORM which never needs to migrate - PostgreSQL",
|
|
15
15
|
"engines": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"test": "jest --no-cache --runInBand"
|
|
48
48
|
},
|
|
49
49
|
"types": "./dist/types/index.d.ts",
|
|
50
|
-
"version": "0.0.
|
|
50
|
+
"version": "0.0.47"
|
|
51
51
|
}
|