@graffy/pg 0.16.15 → 0.16.16
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/index.cjs +8 -7
- package/index.mjs +8 -7
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -33,34 +33,35 @@ class Sql {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
get
|
|
36
|
+
get sql() {
|
|
37
37
|
const len = this.strings.length;
|
|
38
38
|
let i = 1;
|
|
39
39
|
let value = this.strings[0];
|
|
40
40
|
while (i < len)
|
|
41
|
-
value +=
|
|
41
|
+
value += `?${this.strings[i++]}`;
|
|
42
42
|
return value;
|
|
43
43
|
}
|
|
44
|
-
get
|
|
44
|
+
get statement() {
|
|
45
45
|
const len = this.strings.length;
|
|
46
46
|
let i = 1;
|
|
47
47
|
let value = this.strings[0];
|
|
48
48
|
while (i < len)
|
|
49
|
-
value +=
|
|
49
|
+
value += `:${i}${this.strings[i++]}`;
|
|
50
50
|
return value;
|
|
51
51
|
}
|
|
52
|
-
get
|
|
52
|
+
get text() {
|
|
53
53
|
const len = this.strings.length;
|
|
54
54
|
let i = 1;
|
|
55
55
|
let value = this.strings[0];
|
|
56
56
|
while (i < len)
|
|
57
|
-
value +=
|
|
57
|
+
value += `$${i}${this.strings[i++]}`;
|
|
58
58
|
return value;
|
|
59
59
|
}
|
|
60
60
|
inspect() {
|
|
61
61
|
return {
|
|
62
|
-
text: this.text,
|
|
63
62
|
sql: this.sql,
|
|
63
|
+
statement: this.statement,
|
|
64
|
+
text: this.text,
|
|
64
65
|
values: this.values
|
|
65
66
|
};
|
|
66
67
|
}
|
package/index.mjs
CHANGED
|
@@ -31,34 +31,35 @@ class Sql {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
get
|
|
34
|
+
get sql() {
|
|
35
35
|
const len = this.strings.length;
|
|
36
36
|
let i = 1;
|
|
37
37
|
let value = this.strings[0];
|
|
38
38
|
while (i < len)
|
|
39
|
-
value +=
|
|
39
|
+
value += `?${this.strings[i++]}`;
|
|
40
40
|
return value;
|
|
41
41
|
}
|
|
42
|
-
get
|
|
42
|
+
get statement() {
|
|
43
43
|
const len = this.strings.length;
|
|
44
44
|
let i = 1;
|
|
45
45
|
let value = this.strings[0];
|
|
46
46
|
while (i < len)
|
|
47
|
-
value +=
|
|
47
|
+
value += `:${i}${this.strings[i++]}`;
|
|
48
48
|
return value;
|
|
49
49
|
}
|
|
50
|
-
get
|
|
50
|
+
get text() {
|
|
51
51
|
const len = this.strings.length;
|
|
52
52
|
let i = 1;
|
|
53
53
|
let value = this.strings[0];
|
|
54
54
|
while (i < len)
|
|
55
|
-
value +=
|
|
55
|
+
value += `$${i}${this.strings[i++]}`;
|
|
56
56
|
return value;
|
|
57
57
|
}
|
|
58
58
|
inspect() {
|
|
59
59
|
return {
|
|
60
|
-
text: this.text,
|
|
61
60
|
sql: this.sql,
|
|
61
|
+
statement: this.statement,
|
|
62
|
+
text: this.text,
|
|
62
63
|
values: this.values
|
|
63
64
|
};
|
|
64
65
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graffy/pg",
|
|
3
3
|
"description": "The standard Postgres module for Graffy. Each instance this module mounts a Postgres table as a Graffy subtree.",
|
|
4
4
|
"author": "aravind (https://github.com/aravindet)",
|
|
5
|
-
"version": "0.16.
|
|
5
|
+
"version": "0.16.16",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"exports": {
|
|
8
8
|
"import": "./index.mjs",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@graffy/common": "0.16.
|
|
19
|
+
"@graffy/common": "0.16.16",
|
|
20
20
|
"debug": "^4.3.3"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|