This commit is contained in:
Benjamin Toby
2025-02-19 20:01:50 +01:00
parent c08db13f3d
commit e9bb9fb07f
113 changed files with 253 additions and 63 deletions
@@ -22,6 +22,7 @@ const addDbEntry_1 = __importDefault(require("../../functions/backend/db/addDbEn
*/
function checkDbRecordCreateDbSchema(_a) {
return __awaiter(this, arguments, void 0, function* ({ userId, dbSchema, }) {
var _b;
try {
const { dbFullName, dbName, dbSlug, dbDescription, dbImage, childDatabase, childDatabaseDbFullName, } = dbSchema;
let recordedDbEntryArray = userId
@@ -58,6 +59,7 @@ function checkDbRecordCreateDbSchema(_a) {
return recordedDbEntry;
}
catch (error) {
(_b = global.ERROR_CALLBACK) === null || _b === void 0 ? void 0 : _b.call(global, `Error Checking DB Record on Creating Schema`, error);
return undefined;
}
});
@@ -23,6 +23,7 @@ const addDbEntry_1 = __importDefault(require("../../functions/backend/db/addDbEn
*/
function checkTableRecordCreateDbSchema(_a) {
return __awaiter(this, arguments, void 0, function* ({ userId, tableSchema, dbSchema, dbRecord, dbFullName, }) {
var _b;
if (!tableSchema)
return undefined;
try {
@@ -86,6 +87,7 @@ function checkTableRecordCreateDbSchema(_a) {
return recordedTableEntry;
}
catch (error) {
(_b = global.ERROR_CALLBACK) === null || _b === void 0 ? void 0 : _b.call(global, `Error Checking Table Record on Creating Schema`, error);
return undefined;
}
});
@@ -22,6 +22,7 @@ const varDatabaseDbHandler_1 = __importDefault(require("../utils/varDatabaseDbHa
*/
function handleIndexescreateDbFromSchema(_a) {
return __awaiter(this, arguments, void 0, function* ({ dbFullName, tableName, indexes, }) {
var _b;
for (let g = 0; g < indexes.length; g++) {
const { indexType, indexName, indexTableFields, alias } = indexes[g];
if (!(alias === null || alias === void 0 ? void 0 : alias.match(/./)))
@@ -42,6 +43,7 @@ function handleIndexescreateDbFromSchema(_a) {
throw new Error("This Index Does not Exist");
}
catch (error) {
(_b = global.ERROR_CALLBACK) === null || _b === void 0 ? void 0 : _b.call(global, `Error Handling Indexes on Creating Schema`, error);
/**
* @description Create new index if determined that it
* doesn't exist in MYSQL db