This commit is contained in:
Benjamin Toby
2025-01-12 18:19:20 +01:00
parent a3561da53d
commit 186cc76ffb
46 changed files with 344 additions and 211 deletions
@@ -1,4 +1 @@
/**
* # Create database from Schema Function
*/
export default function noDatabaseDbHandler(queryString: string): Promise<any>;
-22
View File
@@ -14,37 +14,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = noDatabaseDbHandler;
const dbHandler_1 = __importDefault(require("./dbHandler"));
/**
* # Create database from Schema Function
*/
function noDatabaseDbHandler(queryString) {
return __awaiter(this, void 0, void 0, function* () {
/**
* Declare variables
*
* @description Declare "results" variable
*/
let results;
/**
* Fetch from db
*
* @description Fetch data from db if no cache
*/
try {
/** ********************* Run Query */
results = yield (0, dbHandler_1.default)({ query: queryString });
////////////////////////////////////////
////////////////////////////////////////
////////////////////////////////////////
}
catch (error) {
console.log("ERROR in noDatabaseDbHandler =>", error.message);
}
/**
* Return results
*
* @description Return results add to cache if "req" param is passed
*/
if (results) {
return results;
}