Updates
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ function apiPost(_a) {
|
||||
}
|
||||
results = result;
|
||||
if (error)
|
||||
throw error;
|
||||
throw new Error(error);
|
||||
let tableSchema;
|
||||
if (dbSchema) {
|
||||
const targetTable = dbSchema.tables.find((table) => table.tableName === tableName);
|
||||
|
||||
+3
-1
@@ -3,7 +3,9 @@ type QueryObject = {
|
||||
query: string;
|
||||
values?: (string | number | undefined)[];
|
||||
};
|
||||
type Return<ReturnType = any> = ReturnType | null;
|
||||
type Return<ReturnType = any> = ReturnType | null | {
|
||||
error: string;
|
||||
};
|
||||
/**
|
||||
* # Run Query From MySQL Connection
|
||||
* @description Run a query from a pre-existing MySQL/Mariadb Connection
|
||||
|
||||
+3
-1
@@ -92,7 +92,9 @@ values, debug) {
|
||||
label: "Error",
|
||||
});
|
||||
}
|
||||
return null;
|
||||
return {
|
||||
error: `Connection DB Handler Error: ${error.message}`,
|
||||
};
|
||||
}
|
||||
finally {
|
||||
conn === null || conn === void 0 ? void 0 : conn.end();
|
||||
|
||||
Reference in New Issue
Block a user