Updates
This commit is contained in:
parent
daad62141e
commit
e7b7cf0314
@ -85,6 +85,13 @@ values, debug) {
|
|||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
(_b = global.ERROR_CALLBACK) === null || _b === void 0 ? void 0 : _b.call(global, `Connection DB Handler Error`, error);
|
(_b = global.ERROR_CALLBACK) === null || _b === void 0 ? void 0 : _b.call(global, `Connection DB Handler Error`, error);
|
||||||
|
if (debug) {
|
||||||
|
(0, debug_log_1.default)({
|
||||||
|
log: `Connection DB Handler Error: ${error.message}`,
|
||||||
|
addTime: true,
|
||||||
|
label: "Error",
|
||||||
|
});
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
@ -42,6 +42,7 @@ export default async function connDbHandler<ReturnType = any>(
|
|||||||
label: "res",
|
label: "res",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return JSON.parse(JSON.stringify(res));
|
return JSON.parse(JSON.stringify(res));
|
||||||
} else if (typeof query == "object") {
|
} else if (typeof query == "object") {
|
||||||
const resArray = [];
|
const resArray = [];
|
||||||
@ -86,6 +87,15 @@ export default async function connDbHandler<ReturnType = any>(
|
|||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
global.ERROR_CALLBACK?.(`Connection DB Handler Error`, error as Error);
|
global.ERROR_CALLBACK?.(`Connection DB Handler Error`, error as Error);
|
||||||
|
|
||||||
|
if (debug) {
|
||||||
|
debugLog({
|
||||||
|
log: `Connection DB Handler Error: ${error.message}`,
|
||||||
|
addTime: true,
|
||||||
|
label: "Error",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
} finally {
|
} finally {
|
||||||
conn?.end();
|
conn?.end();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/datasquirel",
|
"name": "@moduletrace/datasquirel",
|
||||||
"version": "4.4.7",
|
"version": "4.4.8",
|
||||||
"description": "Cloud-based SQL data management tool",
|
"description": "Cloud-based SQL data management tool",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
Loading…
Reference in New Issue
Block a user