-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
index.js
25 lines (25 loc) · 845 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import r from "@swc/helpers/src/_async_to_generator.mjs";
Promise.all(assignAll).then(function() {
var n = r(function*(r) {
for(let n in obj){
let e = obj[n];
e.id, (yield listOfUser(e.id)).forEach((r)=>{
insertQuery += `INSERT INTO "TABLE"("UUID", id, other_ids_here) VALUES ('${uuidv4()}', '${e.id}', now());`;
});
}
});
return function(r) {
return n.apply(this, arguments);
};
}());
export const listOfUser = function(n) {
var e;
return new Promise((e = r(function*(r, e) {
let t = `Select Distinct id from "TABLE" Where id = '${n}' And user_id IS not null`;
postgreSQL.query(t, null, function(n, t) {
n ? e(n) : r(t.rows);
});
}), function(r, n) {
return e.apply(this, arguments);
}));
};