Skip to content

Commit

Permalink
Added debug statement.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Oct 2, 2023
1 parent 19b0f1e commit 9985532
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion databases/postgres_db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export const Database = class extends AbstractDatabase {

let removeCount = 0;

console.log("BulkObjs",bulk)
for (const i in bulk) {
if (bulk[i].type === 'set') {
replaceVALs.push([bulk[i].key, bulk[i].value]);
Expand All @@ -193,8 +194,9 @@ export const Database = class extends AbstractDatabase {

const functions:any = replaceVALs.map((v) => (cb:()=>{}) => this.db.query(this.upsertStatement as string, v, cb));

console.log("Vals",removeSQL, removeVALs)
const removeFunction = (callback: ()=>{}) => {
if (!(removeVALs.length as number > 1)) {
if ((removeVALs.length == 1)) {
this.db.query(removeSQL, removeVALs, callback);
} else { callback(); }
};
Expand Down

0 comments on commit 9985532

Please sign in to comment.