Compare commits
2 Commits
d47b00b5cd
...
3d9bc487ba
Author | SHA1 | Date | |
---|---|---|---|
3d9bc487ba | |||
bde86fd3eb |
3
index.js
3
index.js
@ -37,6 +37,9 @@ Postgres.connect();
|
|||||||
Postgres.FirstRow = function(inSQL, args, inResponse) {
|
Postgres.FirstRow = function(inSQL, args, inResponse) {
|
||||||
Postgres.query(inSQL, args, (err, res) => {
|
Postgres.query(inSQL, args, (err, res) => {
|
||||||
if (err === null) {
|
if (err === null) {
|
||||||
|
//need to test if the response is an object or an array
|
||||||
|
//inResponse.json(res.rows[0]);
|
||||||
|
//if (Array.isArray(res)) {}
|
||||||
inResponse.json(res[1].rows[0]);
|
inResponse.json(res[1].rows[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
1075
package-lock.json
generated
1075
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -140,6 +140,7 @@ FROM
|
|||||||
WHERE
|
WHERE
|
||||||
pscale.factor <> 0 or pscale.mod_price <> 0
|
pscale.factor <> 0 or pscale.mod_price <> 0
|
||||||
)
|
)
|
||||||
|
, ins AS (
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
tpsv.dcard
|
tpsv.dcard
|
||||||
SELECT
|
SELECT
|
||||||
@ -151,4 +152,6 @@ SELECT
|
|||||||
*
|
*
|
||||||
FROM
|
FROM
|
||||||
pricing
|
pricing
|
||||||
|
RETURNING *
|
||||||
|
)
|
||||||
|
SELECT COUNT(*) as num_rows FROM ins
|
||||||
|
Loading…
Reference in New Issue
Block a user